Choose database and populate combo box [message #1030221] |
Sat, 30 March 2013 21:54 |
José Litux Messages: 52 Registered: March 2013 |
Member |
|
|
hi
I'm new to Birt and i'm impressed for such a piece of software. It's awesome!
In a pair of weeks I'm fairly good at using datasets and parameters but today i'm stuck on finding a way to allow the user to choose a Database and after this, populate the content of a combobox from a query that involves a table, and depending on that selection, load a bunch of datasets for a very complex report.
My server offers 3 databases depending on the zone you want to report: America, Europe, Asia.
The user selects continent, and then a combo-box offers countries from that continent. So far, so good.
The problem is that when the country is selected, 27 different Datasets use the country parameter to populate the report queryng to the right continent Database.
Seems to be a simple cascading parameters report but i'm stuck. I've tried the approach from this thread succeeding on continent selection:
http://www.eclipse.org/forums/index.php/m/891673/
but notice that I have to generate the same 27 Datasets for every continent because Dataset depends on Datasource. 27 x 3 equals 81 datasets to be made !!!!
What I need is a way to change the Database the connection reads upon continent user selection. Nothing more (well, and force refreshing the countries combo) because the 27 querys are the same no matter country or continent.
Any hint o small tutorial would be very much appreciated (coding is not my cup of tea, so I will appreciate an easy "wizardly" approach)
Thanks in advance
[Updated on: Sun, 31 March 2013 08:58] Report message to a moderator
|
|
|
Re: Choose database and populate combo box [message #1032052 is a reply to message #1030221] |
Tue, 02 April 2013 14:06 |
|
So, you have three different databases? So, you'd need to change the dataSource for the different zones? Have you looked into using the property binding tab in the dataSource editor to change the database URL, using your zone parameter value? If everything with the databases is the same, after that, that would be the only change you should need to only use 27 dataSets, rather than 81. Let me know if I missed something.
Michael
Developer Evangelist, Silanis
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03824 seconds