Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add background text or image to BIRT report?

I have to add text or background image as "DRAFT" for report when it match certain condition.I have to dynamically enable or display birt report back ground text ?

I am looking forward to hear any ideas.

Thanks In Advance. Thillakan.

like image 514
nayakam Avatar asked Sep 19 '25 15:09

nayakam


1 Answers

To set up a static background image as you would:

  • Select the master page in your report workspace.
  • Select the "Properties" tab.
  • Expand the Simple Master Page" section.
  • Set the background image.

However, to make it dynamic based on something (such as a parameter), you can use Javascript to manipulate the report items directly. This is covered in chapter 13 of "Integrating and Extending BIRT" which, along with "BIRT, A Field Guide to Reporting", every BIRT report designer should have.

The easiest way is to name your master page specifically in the report designer and use ReportDesignHandle.findElement(<name>) to get its handle. Then use a setter to dynamically change the background image. The beforeRender script is the one where you want to put all this code which sets the background image.

like image 125
paxdiablo Avatar answered Sep 22 '25 04:09

paxdiablo