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:
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.)
Here the page window is defined at the left lowermost part so that the page numberis printed at the rightmost lower corner.
c. Pass the control print parameter language as ‘A’.
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:
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:
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.
Step 2: Declare a window for the Page number:
There is a text defined and a code piece.
Step3: Text is defined as follows:
Step4: The code part is used to populate FNAME:
Now the page number is displayed as follows:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
4 | |
2 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 |