Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Dynamic watermarks using parameters
Dynamic watermarks using parameters [message #180290] Wed, 26 July 2006 20:37 Go to next message
Eclipse UserFriend
Originally posted by: warlock12.gmail.com

I would like to know if anyone had an idea on how to insert images into a
report in BIRT so as to make them seem watermarks, and making them dynamic
by specifying a parameter that sends the value correspondent to the wanted
image. I have tried using parameters for dynamic images in a report and it
worked, but haven't been able to use a dynamic image as a watermark or
background for the report. What I am trying to do is let the user decide
which image it wants as a background to the report that he/she has called
to. And what this does is send a string to the database with the name of
the image, which then returns the image correspondent to the string and
displays it as a background or watermark. The only way I have found to
have a watermark is to specify an image background in a style, but this
only gives me the option of having a static image, in which the user will
not be able to choose the watermark he/she wants or needs, he/she will
have to print the report with that specified static image. Thank you for
your help.

Marco
Re: Dynamic watermarks using parameters [message #778152 is a reply to message #180290] Wed, 11 January 2012 13:43 Go to previous message
Frizz K is currently offline Frizz KFriend
Messages: 18
Registered: March 2010
Junior Member

in the outline select your report design;
select the "script" tab;
select "initialize" in the dropdownlist "script"

put this code

if ( params["backgroundYes"].value ){
reportContext.getDesignHandle().findStyle("page").setBackgroundImage("myBImage.png");
}
else{
reportContext.getDesignHandle().findStyle("page").setBackgroundImage("");
}


set a boolean report parameter named backgroundYes (in the data explorer view)
Previous Topic:MS - Doc of version 2011 do not open
Next Topic:getting Data Element value in onCreate event
Goto Forum:
  


Current Time: Fri Apr 19 03:16:33 GMT 2024

Powered by FUDForum. Page generated in 0.02679 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top