Create the Query and Paper Layout for a Multibyte Report

38-6 Oracle Reports Users Guide to Building Reports

14. Click Next.

Oracle Reports Builder displays the following message to indicate that an additional parameter is created: Note: The query Q_1 has created the bind parameters P_LANG_ID.

15. Click OK.

16. On the Fields page: ■ Click PRODUCT_ID in the Available Fields list, and click the right arrow to move the field to the Displayed Fields list. ■ Click TRANSLATED_NAME and click the right arrow to move the field to the Displayed Fields list. ■ Click TRANSLATED_DESCRIPTION and then click the right arrow to move the field to the Displayed Fields list.

17. Click Next.

18. On the Totals page, click Next.

19. Click Next on the Labels page.

20. On the Templates page, make sure that Beige is selected and click Finish.

Oracle Reports Builder displays the Runtime Parameter Form because you referenced a user parameter.

21. Type JA, and click the Run Report button to execute the report.

The report output is displayed in Paper Design view. It should look something like this: Figure 38–4 Paper design view of the report without Japanese characters in default setting You will not see any Japanese characters yet since a UTF8 TrueType font has not been selected. Tip: If you do not see any results, make sure that the value JA is typed in capital letters so that data is retrieved from the database for the specified condition. Building a Report with Multibyte Characters for PDF Output 38-7 22. Save the report as multibyteutf8_your_initials.rdf.

38.3 Display Multibyte Characters in the Report

You have successfully created and executed the report. Next, you have to change the font to a UTF8 multicharacter set TrueType font to see the characters of the language chosen in the report output. To change the font to a multicharacter TrueType font:

1. In the Paper Design view, Shift-click the values below the Translated Name and

Translated Description labels to select all the values in these two columns. You can now change their properties simultaneously.

2. From the font box in the toolbar, choose Arial Unicode MS.

The report is executed and the Paper Design view of the report output is displayed in Japanese characters. It should look something like this: Figure 38–5 Paper design view of the report with Japanese characters To run the same report in another language: To run the same report again with a different runtime parameter and see the output in another language, perform the following steps:

1. Click the Run Paper Layout button in the toolbar, or choose Program Run Paper

Layout . Note: When designing a report, it is good practice to save it frequently under a different file name as a precautionary measure. Then, if you need to revisit some of the changes or if you generate an error, you can go back to the previously saved file and make revisions from that point. 38-8 Oracle Reports Users Guide to Building Reports 2. In the Runtime Parameter Form, type the value PL, and click the Run Report button to run the report. The Paper Design view of the report output is displayed with Polish characters. It should look something like this: Figure 38–6 Paper design view of the report with Polish characters

38.4 Create a PDF Document of Your Report

Oracle Reports Builder supports multibyte characters in the PDF format. By generating the PDF file of your report, you have the advantages of being able to: ■ create the report output in a portable format. ■ use PDF font subsetting and PDF font embedding feature. To generate the PDF file:

1. In Oracle Reports Builder, choose File Generate to File PDF.

2. Save the report as multibyteutf8_your_initials.pdf. Tip: Make sure you perform the following steps before you generate the file: ■ Change the registry entry for NLS_LANG to AMERICAN_ AMERICA.UTF8. ■ Edit the uifont.ali file. ■ Edit the REPORTS_PATH registry entry. See Section 38.1, Prerequisites for This Example for more details. Building a Report with Multibyte Characters for PDF Output 38-9 3. In the Runtime Parameter Form that displays, type the value PL exactly as shown, and click the Run Report button to execute the report. The Report Progress dialog box is displayed and provides the print status of the PDF output. When the PDF is created, this dialog box disappears. 4. Locate the PDF file multibyteutf8_your_initials.pdf and double-click to open the file. It should look something like this: Figure 38–7 PDF file of the report with Polish characters

38.5 Summary

Congratulations You have successfully created a report to support any character set in your enterprise. You have used Oracle Reports Builder to generate a portable PDF file using font subsetting. You now know how to: ■ create the query and paper layout for the multibyte report using the Report Wizard. ■ display multibyte characters using the UTF8 TrueType font. ■ create a portable PDF file of your report. For more information on any of the wizards, views, or properties used in this example, refer to the Oracle Reports online Help, which is available in Oracle Reports Builder or hosted on the Oracle Technology Network OTN, as described in Section 4.1.1, Using the Oracle Reports online Help . Note: You can open the PDF file on any computer and it will look exactly the same, without installing any Unicode font. This is because the PDF file includes the font used in the report. Notice the default rough visual appearance of the characters in the PDF output. You can smooth the characters by using smoothe lineart setting in Acrobat Reader.