Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Property binding and dynamic paramaters
Property binding and dynamic paramaters [message #965929] Wed, 31 October 2012 16:16 Go to next message
Martin Fluegge is currently offline Martin Fluegge
Messages: 141
Registered: July 2009
Senior Member
Hi everybody,

I have a small problem with reports.

As I need to provide different databases for different stages (development, testing, production) I configured my data source dynamically using the ‚Äěproperty binding" to set the db-host, password and user.

e.g.
"jdbc:mysql://"+params["host"].value+":3306/mmmreporting?blobSendChunkSize=1000000"

This allows me to pass a parameter which sets the correct values for the stage. This works for most of my reports.

But in some reports I also need to add dynamic parameters, which is filled by of data from the db and provides a dropdown box for the user to select certain kind of information.

I run into the problem, that this drop down menu is always empty. I far as I can see this happens because the paramters for the database are not set when the dialog is opened, so the query for the drop down menu data fails.

Is there somethign I can do to bring up the data in the drop down box even if I am using the property binding to set the value for the db connection?

Thanks in advance.

Cheers,

Martin
Re: Property binding and dynamic paramaters [message #966645 is a reply to message #965929] Thu, 01 November 2012 05:41 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1639
Registered: July 2009
Senior Member

This isn't something you can use a second dataSource with static connection data for? The parameter options from the db will change based on the other provided parameters?

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: Property binding and dynamic paramaters [message #966791 is a reply to message #966645] Thu, 01 November 2012 08:26 Go to previous messageGo to next message
Martin Fluegge is currently offline Martin Fluegge
Messages: 141
Registered: July 2009
Senior Member
Hi Michael,

thanks for your response.

Unfortunately I need to use this DB as the values for the drop down list must be read from the stage db.

I am quite new to BIRT so I am not sure whether I really understand what happens. When the datasource is static everything works fine and the values (for the drop down list) can be read from the DB before the dialog is openend.

I my report I am using the following script to initialize the db connection parameters. But I feat his is too late for the paramters dialog. Is there a way to invoke this script early? Before the parameters dialog is shown?


<method name="initialize"><![CDATA[
if(params["stage"].value=="DEV")
{
params["host"].value="devdbhost";
params["db_user"].value="user";
params["db_password"].value="****";
}
else if(params["stage"].value=="PROD")
{
params["host"].value="proddbhost";
params["db_user"].value="user";
params["db_password"].value="****";
}
else
{
params["host"].value="localhost";
params["db_user"].value="user";
params["db_password"].value="****";
}
]]></method>


Cheers,

Martin
Re: Property binding and dynamic paramaters [message #968595 is a reply to message #966791] Fri, 02 November 2012 15:31 Go to previous messageGo to next message
Michael Williams is currently offline Michael Williams
Messages: 1639
Registered: July 2009
Senior Member

For these reports, you might have to create two levels of reports. The first one takes the connection parameters and then you create a parameter form, using HTML text boxes, in the layout, allowing the user to select the parameters. Then, from this report, you call your actual report, passing along the selected values.

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Re: Property binding and dynamic paramaters [message #998717 is a reply to message #968595] Thu, 10 January 2013 14:52 Go to previous messageGo to next message
Soumita Das is currently offline Soumita Das
Messages: 19
Registered: January 2013
Junior Member
Hi Michael,
My problem is kind of similar.
You have suggested "Then, from this report, you call your actual report, passing along the selected values."
Could you please tell me how to do this?I am unable to pass the selected values and call the actual report.
I don't want to use "report parameter" neither call an url.
Please help me.
Re: Property binding and dynamic paramaters [message #998945 is a reply to message #998717] Fri, 11 January 2013 02:41 Go to previous message
Michael Williams is currently offline Michael Williams
Messages: 1639
Registered: July 2009
Senior Member

You don't want to use a URL?

Michael

Add interactivity, scheduling, sharing, live Excel export, and JS integration to your BIRT app with the new, free BIRT server, BIRT iHub F-Type.
Previous Topic:How to get all Images in Report and there datasets
Next Topic:How does BIRT determine the jdbc resultset datatypes?
Goto Forum:
  


Current Time: Sun Oct 26 09:50:53 GMT 2014

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

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