Requirement: We have a current requirement where we need to print both ENGLISH and ARABIC texts and numerals in the same output form for Purchase Orders, Sales Orders, and Invoices etc.

Issue Faced: The smart forms while getting printed either shows the Arabic texts in jumbled format (when the print parameter passed is ‘EN’) or it shows all the numerals in Arabic (when the print parameter passed is ‘AR’).

Solution: We need to have the following things in place for printing bidirectional language texts (both fixed and dynamic) [in our case the languages being English – Left to Right (LTR) and Arabic – Right to Left (RTL)] in the same form printout:

  1. Create the form in Arabic language.

/wp-content/uploads/2014/03/1st_406703.png

b. Create all the windows as mirror image of what is the actual output (for example you want a window to appear in the form output to the left topmost      corner – so define it at the right topmost corner and vice versa.)

     /wp-content/uploads/2014/03/2nd_406704.png

     Here the page window is defined at the left lowermost part so that the page numberis printed at the rightmost lower corner.

     /wp-content/uploads/2014/03/3rd_406705.png

c.     Pass the control print parameter language as ‘A’.

/wp-content/uploads/2014/03/4th_406712.png

d.     Declare all numerals which you want to get displayed in English as dynamic texts.

       Before the declaration as dynamic text the output is as follows:

/wp-content/uploads/2014/03/5th_406713.png

     If you have a look at the left hand window, we see that the text is coming in English but the numerals are in Arabic.

    After using dynamic text the numerals are now coming in English:

/wp-content/uploads/2014/03/6th_406714.png

    So now we need to know, how to go ahead with using dynamic texts in Smart Forms:

    Let us take an example where we print the page number as

    Page <Page number> of <Total Page Count>.

    Step 1: Declare a variable of type TSFTEXT.

/wp-content/uploads/2014/03/7th_406718.png

    Step 2: Declare a window for the Page number:

/wp-content/uploads/2014/03/8th_406719.png

There is a text defined and a code piece.

  Step3: Text is defined as follows:

/wp-content/uploads/2014/03/9th_406720.png

Step4: The code part is used to populate FNAME:

/wp-content/uploads/2014/03/10th_406728.png

Now the page number is displayed as follows:

/wp-content/uploads/2014/03/11th_406729.png

To report this post you need to login first.

3 Comments

You must be Logged on to comment or reply to a post.

  1. Abdul Hameed Hussain

    Hi Barik,

         I was looking for the solution for this problem,but couldn’t find any until this wonderful document.It’s really helped me.Thank you .

    Regards,

    Abdul Hameed Hussain

    (0) 
  2. Nooruddin Bohra

    Hi Argha,


    Thanks for the post.

    I am having a problem that if I am printing a line that starts with number or special character then it gets printed on right instead of left.  Also the special characters on last are getting printed on first place.


    I have written 1. Text 1 and so on.. But it is printing Text 1 .1

    Similarly page 1 of 1. is printed as .page 1 of 1

    Capture2.PNG


    It will be great if you can help me with this.


    Regards,

    Nooruddin Bohra

    (0) 

Leave a Reply