Choose database and populate combo box [message #1030221] |
Sat, 30 March 2013 17:54  |
Eclipse User |
|
|
|
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 04:58] by Moderator
|
|
|
|
|
Re: Choose database and populate combo box [message #1033539 is a reply to message #1030221] |
Thu, 04 April 2013 06:48  |
Eclipse User |
|
|
|
Quote:the problem is when selected the main zone, combo with countries not updating
It is probably because you use a separate report parameter to select the database, and this parameter is not in the "countries" cascading group.
Combobox datasets work in a different manner than other report datasets. A report parameter used in a property binding to select a database will be ignored by combobox datasets: the default database will always be taken, unless this parameter is additionally the first level of a cascading combobox group.
So the only way to introduce a dependency between 2 parameters is the "cascading" feature, even for a database connection: If the "continent" parameter is the parent of "countries" in a cascading group, and is also used in the datasource property bindings to build a connection URI, then your countries combobox should be correctly updated.
|
|
|
Powered by
FUDForum. Page generated in 0.02576 seconds