Many Oracle developers have been surprised at times when things which appear simple are much more time consuming than envisioned. An example of this is using BI Publisher to display checkbox in an XML Report. While this task is not very complicated, there are several steps required to enable this simple feature on your XML Reports. This blog will detail the steps involved in achieving the requirement.
A. Let’s Get Started! Designing your RTF Template:
1) Place required checkbox form field onto your template. [Navigation: Developer->Controls->Legacy Forms]
2) The value of checkbox can be modified based on the criteria in checkbox Form field Help Text. In the example below you can see the checkbox will be checked if PARTIES_TO_TRANSACTION value is ‘Y’.
3) Save template as RTF. If you test/preview your template it will not show check boxes properly, instead it will show diamond shaped pictures or other silly characters. This is an expected behavior, as Bi Publisher could not find the exact mappings for the check boxes when generating output. It requires character set/fonts mapping to be done.
4) In order to do character set/fonts mappings on local machine, take “xdo example.cfg” file, available in your machine at “/BI Publisher\BI Publisher Desktop\Template Builder for Word\config”.
Save this file as “xdo.cfg” in the same folder.
Verify the “Wingdings” family property is correctly pointing to the “fonts” directory in your machine or not.
You may also notice that “rtf-checkbox-glyph” property already available in .cfg file and which is set to “Wingdings;0254;0160”.
These two steps are important to show check boxes correctly.
B. Font Mapping: In order to run the report in your Apps environment, font mapping is required on the server. The steps below describe this mapping:
1) On BIP server, upload the Wingdings 2 fonts. This is a .ttf file, You can find this in your Windows machine at C:\Windows\Fonts\
2) Upload this .ttf file to your BIP server onto …jdk/jre/lib/fonts. This will change depending on BIP server installation. For me the path is /oracle/apps/OraHome_1/jdk/jre/lib/fonts
3) Now log into your BIP server as Administrator. Navigate to Admin –> Font Mappings.
4) Click on “Add Font Mapping”. In the next screen, check if new font appears in the target font mappings dropdown list.
5) If the font appears in the list, select it under Truetype. In the top Field, enter Windings2. Leave the Style and Weight as Normal. Leave the TTC Number blank.
6) Click on “Add Font Mapping”. In the next screen, check if new font appears in the target font mappings dropdown list.
7) Edit xdo.cfg file. It will be somewhere under Configuration folder …/OraHome_1/xmlp/XMLP/Admin/Configuration/xdo.cfg
8) Open the xdo.cfg file in notepad. BIP would have already added the font mapping into it. You now need to add the character code for the “Yes” and “No” values to toggle the Checkbox. Add below line in the properties container:
5. Restart the BIP Server.
6. When you generate the PDF output of the report, the checkboxes should appear properly now as below:
So, there are the steps, maybe a few more steps than we would like to see but - it’s that simple! Be sure to “check” back with us to view upcoming Tip of The Day’s.