Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Dynamic Report Title
Dynamic Report Title [message #364499] Sat, 02 August 2008 23:39 Go to next message
ZJ Da is currently offline ZJ Da
Messages: 6
Registered: July 2009
Junior Member
Hi, I want to dynamically display report title based on the report
parameters, e.g. "Sale Report (Date range: 01/01/01 - 02/02/02)". The
dates come from the report parameters.

Thanks,
-ZJ
Re: Dynamic Report Title [message #364507 is a reply to message #364499] Mon, 04 August 2008 10:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: jasonweathersby.alltel.net

ZJ,

What type of element are you displaying the title in?

Jason

ZJ Da wrote:
> Hi, I want to dynamically display report title based on the report
> parameters, e.g. "Sale Report (Date range: 01/01/01 - 02/02/02)". The
> dates come from the report parameters.
> Thanks,
> -ZJ
>
Re: Dynamic Report Title [message #364511 is a reply to message #364507] Mon, 04 August 2008 12:42 Go to previous messageGo to next message
ZJ Da is currently offline ZJ Da
Messages: 6
Registered: July 2009
Junior Member
Hi Jason,

Thank you for looking at my question. It is the report title which is a
user property displayed in Properties->General tab along with Author,
Created by, Path. If I don’t set it, the Birt viewer will display “BIRT
Report Viewer”.

I tried to set it to

Sales Report (Date Range:<VALUE-OF>params["startdate"]</VALUE-OF> -
<VALUE-OF>params["endate"]</VALUE-OF>)

However, it does not evaluate the <VALUE-OF> tag. I also tried to use
javascript setUserProperty(“title”, “xxxxxx”) in beforeFactory event.
But I got “Property already exists” error.

I am using Birt 2.2.2. I don't know if I can use any type of element for
it.

I will appreciate it if you have any solution.

Regards,
-ZJ
Re: Dynamic Report Title [message #364514 is a reply to message #364511] Mon, 04 August 2008 14:41 Go to previous messageGo to next message
Eclipse User
Originally posted by: jasonweathersby.alltel.net

ZJ

You can set the property like:
reportContext.getReportRunnable().designHandle.getDesignHand le().setProperty( "title",
"My Test Title");

but at this point it is to late to modify the title because the viewer
has already started processing the report. As a work around you can add
__title=whatevertitleyoulike to the url and if the property in the
report is not set it will use the one you have specified in the url.

Jason

ZJ Da wrote:
> Hi Jason,
>
> Thank you for looking at my question. It is the report title which is a
> user property displayed in Properties->General tab along with Author,
> Created by, Path. If I don�t set it, the Birt viewer will display �BIRT
> Report Viewer�.
> I tried to set it to
> Sales Report (Date Range:<VALUE-OF>params["startdate"]</VALUE-OF> -
> <VALUE-OF>params["endate"]</VALUE-OF>)
>
> However, it does not evaluate the <VALUE-OF> tag. I also tried to use
> javascript setUserProperty(�title�, �xxxxxx�) in beforeFactory event.
> But I got �Property already exists� error.
> I am using Birt 2.2.2. I don't know if I can use any type of element
> for it.
>
> I will appreciate it if you have any solution.
>
> Regards,
> -ZJ
>
>
Re: Dynamic Report Title [message #364516 is a reply to message #364514] Mon, 04 August 2008 15:31 Go to previous message
ZJ Da is currently offline ZJ Da
Messages: 6
Registered: July 2009
Junior Member
Hi Jason,

Your solution works perfectly.

Thanks very much,

-ZJ
Previous Topic:Class cat exception Out of memory
Next Topic:Export-to-excel unreliable
Goto Forum:
  


Current Time: Tue May 21 06:14:18 EDT 2013

Powered by FUDForum. Page generated in 0.01565 seconds