Friday, October 16, 2009

BI Publisher: 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.

18 comments:

Anonymous said...

Hi Chandra, I did exactly like you specified but i still have problems with checkbox. I see a ? in place of check box. I would really appreciate your help on this issue.

Thanks
Kumar

Anonymous said...

Hello Chandra,

Thanks for the post. I implemented like specified in your post but i don't see the checkbox but i see a ? symbol in its place. Its very important for me. Your help on this would be really appreciated.

Thank You
PK

Rithesh said...

Hi Chandra,

Thanks for the post. I followed the same steps exactly as you mentioned.But when I generate a report I see a ? in place of check box. Can you please helpe me. It will be of great help since my template has nearly 200 check box fields and this functionality is more important for us to work.

Thanks
Rithesh

Chandra R Matta said...

HI Ritesh,
Can you able to produce checkbox atleast from your desktop.
Once you do this, you can proceed to do similar font settinsgs at server side.

Share your XML file(should be simple) and your RTF template. I will verify it from my side, if I could.

Thanks,
Chandra

Rithesh said...

Hi Chandra, thanks for your reply.

I am able to produce the checkbox from the desktop.I am unable to upload the XML and RTF since I dont have your mail id.

Here is the sample XML.

YY

The XML above I put above has 4 checkbox fields.Check box in the RTF template has condition:


This same condition is used for all the checkbox fields in the template.

Thanks in advance.
Rithesh

Anonymous said...

Hello Chandra,

Perfect solution...
Thanks a lot for this....

Now it's working correctly for true condition ..

I mean when condition is true then checkbox coming correctly.
But when condition false then only "." is coming there.

Is there any wrong I have done in that..
I followed your steps... please help if I missed any one....

Thank you again ....

Chandra R Matta said...

Hi,
Make sure you get "Y" and "N" in your XML file, instead of boolean values TRUE and FALSE.

Then test it on your desktop and see the results.

Thanks

Anil Medam said...

Hi Chandra,
I tried the same procedure as you mentioned, but has no luck in getting the check box Checked or Unchecked based on condition. Please let me know your email Id, so that I can send the XML file,RTF and O/P PDF file.Really appreciate your response for this as I have been looking for the solution since long time and finally found your link.
My e-mail Id is medam.anil@gmail.com
Thanks again.
Anil.

Chandra R Matta said...

send me to chandra.matta@gmail.com

Rajesh Reddy said...

Hi Chandra its is working for me . But only i see a undefined character in the place when i give check box condition for example I have . after closing and opening the File I see unreadable format. Can you please help me.

Chandra R Matta said...

Rajesh, send me screenshot, your template and sample xml data file.

Unknown said...
This comment has been removed by a blog administrator.
Unknown said...

Hi Chandra,
I am using ms word 2007 for bi publisher. I did all the step as you mention, but i still have problems with checkbox. I see a diamond shape in place of check box. I would really appreciate your help on this issue.

Thanks you!

Santosh Chauhan

Unknown said...

How can i login to XML Publisher Administrator. in server side

Chandra R Matta said...

Sai, Log into "XML Publisher Administrator" responsibility and double click on "Administration"

Dedeepu Kalva said...

Hi Chandra,

Thanks for your guide. It is working in my local. But during runtime, it is showing Rhombus symbol. I am using Oracle ERP BI Publisher, can you pls share the steps to import font.

Chandra R Matta said...

Hi Dedeepu,
That means the font that supports checkbox is not available in the server.
You may need to copy the font file(ALBANWTJ.ttf) into your server and try.

You can see Oracle Doc ID 874194.1 for further information.

Thanks

Dedeepu Kalva said...

Thanks for your reply, I will upload new font mapping and check.