views:

1071

answers:

1

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.

+3  A: 

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.

paxdiablo
Hi pax, Thanks for your info. In addition to this, I created a style and set the style to Simple Master Page" section. I put the static background image but when i tried to view as PDF report, back ground image does not appear. It works for html viewer. I had access to A Field Guide to Reporting but it is some where lost :(. Anyway thanks for your time, I will look in to the scripting part.Thillakan
Thillakan
The field guide is okay but you'll need the integrating/extending book if you want to do really fancy Java/Javascript report manipulation.
paxdiablo