5 Replies Latest reply: May 1, 2012 3:14 AM by Mohammad Shaddad RSS

    English and Arabic reports output in PDF

    18865
      Hi,
      We generate reports in pdf through our application. We have some English reports(left to right) and some Arabic reports(right to left) but directions settings in our application server is left to right so our Arabic reports are also coming left to right.
      How to resolve this?

      Application server 10g
      Report Builder 10.1.2.0.2
      Thanks
      Tariq

      Edited by: tariqonnet on Apr 22, 2012 10:20 AM
        • 1. Re: English and Arabic reports output in PDF
          676301
          Hi !

          You must have to set any parameter which highlight the Lenguage English or Arabic then you apply this code on the fields you want to print.

          if (:Parameter = 'A') then
               srw.set_justification(srw.right_hjust);
          elsif (:parameter = 'E') then
               srw.set_justification(srw.left_hjust);
          end if;
          • 2. Re: English and Arabic reports output in PDF
            18865
            No, its not a reports issue, its application server. As far as I know, you can configure application server setting to one of the following: Left to Right OR Right to left. I need to change these settings dynamically at Form level, i.e. for English reports it switches L to R and for Arabic it should be R to L.
            • 3. Re: English and Arabic reports output in PDF
              Mohammad Shaddad
              could you please provide me with example of the output,
              is it readable or not?
              because i think you issue related to the NLS_LANG in the regedit in the application server, but i will be sure after you provide me with the sample.
              • 4. Re: English and Arabic reports output in PDF
                18865
                It is readable and its not NLS_LANG issue, its just alignment, for Arabic report caption should come to the right and field to the left but its coming opposite, paragraph should be right aligned but its left and so on....So I have to design my report in a way that suits the output (in pdf) and not how it looks in report builder and believe me its very time consuming, I have to try 10-15 times for each field to reach a desired output.

                p/s: running directly from report builder is fine, problem is once I move this report to application server and run through our main application

                Thanks
                Tariq
                • 5. Re: English and Arabic reports output in PDF
                  Mohammad Shaddad
                  if you are using JSP reports that is means you are encountering the following bug: please change it to RDF and try again.
                  Bug 7671625 "PDF OUTPUT IS LTR WHEN RUNNING JSP REPORTS REGARDLESS OF NLS_LANG SETTINGS"

                  --------------------------------------------------------------

                  otherwise change this parameter in the windows regestry REPORTS_BIDI_ALGORITHM=UNICODE and restart the report server then try printing the report


                  --------------------------------------------------------------
                  or
                  1. Backup and edit the Reports Server configuration file $ORACLE_HOME/reports/conf/REPORTSERVERNAME.conf.

                  2. Add the following lines :

                  <environment id="AR">
                  <envVariable name="NLS_LANG" value="ARABIC_EGYPT.AR8ISO8859P6"/>
                  <envVariable name="TK_LOCALE" value="bidi"/>
                  <!--envVariable name="REPORTS_BIDI_ALGORITHM" value="UNICODE"/-->
                  <!--envVariable name="REPORTS_ARABIC_NUMERAL" value="ARABIC"/-->
                  </environment>

                  3. Modify the line for the engine tag to use the specified Environment ID. For example, change:

                  <engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1" maxEngine="1"
                  minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="90000">

                  TO:

                  <engine id="rwEng" class="oracle.reports.engine.EngineImpl" initEngine="1" maxEngine="1"
                  minEngine="0" engLife="50" maxIdle="30" callbackTimeOut="90000" defaultEnvId="AR">

                  4. Save and exit the Reports Server configuration file.

                  5. Restart the Reports Server for the changes to take effect.