Monday 25 July 2011

How to Print check box on BI Publisher


Question: How to print Check box on BI Publisher(XML Publisher) Reports.?
Answer:
Follow these steps to create checkboxes or any symbols for your XML Publisher Reports.
1. Design RTF template.
2. Place your check boxes on the template.

    For MS WORRD-2007, check box available under "Developer" menu/Legacy tools.
3. Right Click on checkbox and etnter criteria how the check box should behave.
      Ex: Which means, when the "DFF_FUMIGATION" is Y, then check box is checked. Otherwise un-checked.

4. Design other check boxes in similar way.

Note: Do not enter criteria under “BI Publisher Properties”. Enter criteria only on “Form field Help Text”.

5. 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 any other junk characters.

This is expected behavior, as Bi Publisher could not find exact mappings for the check boxes when generating output.

6. To do character set/fonts mappings..
Take “xdo example.cfg” file, which will be available in your machine “ /BI Publisher\BI Publisher Desktop\Template Builder for Word\config”

Save as 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.

7. Test your RTF template. You may notice check boxes displayed properly in the output.


After changing above property in “xdo.cfg” file and placed it under “ /BI Publisher\BI Publisher Desktop\Template Builder for Word\config”

Return to RTF template and click on preview again to verify the results.
 
Now RTF Template creation and setups steps required to generate check boxes are completed.
Create Data definition, Template and then upload your RTF template.

To complete font mappings at server side,

1. Log in as XML Publisher Administrator.

2. Navigate to Administration->Font Files->Create Font File.

3. Fields are Font Name and File.

For Font Name choose any descriptive name.

File will browse your PC to locate the font file.
4. Navigate to Font Mappings->Create Font Mapping Set.

5. Mapping name is the name you will give to a set of fonts.

6. Mapping code is the internal name you will give to this set.

7. Type: 'PDF Form' for PDF templates. 'FO to PDF' for all other template types.
 
 
  8. Create Font Mapping (this allows you to add fonts to a set).
 
9. Font Family is the exact same name you see in Word under Fonts.

If you don't use the same name the font will not be picked up at runtime.

10. Style and weight must also match how you use the font in windows.

Normal and Normal are good defaults.

11. Language and Territory should remain blank (NULL).




12. Navigate to Configuration General-> FO Processing->Font Mapping Set.
Can also be done at data def and template level under Edit Configuration.

Hierarchy is Site-> Data Def -> Template.
13. Select your new mapping set.

14. Make sure the font is not referenced under File->Properties->Custom in the RTF template file.

15. Under General set a Temporary Directory.
The font will be downloaded here under /fonts to be used at runtime, the first time the font is used.



16. Upload a template that uses your special font and test using preview or by submitting a concurrent request.

No comments:

Post a Comment