|Choose database and populate combo box [message #1030221]
||Sat, 30 March 2013 17:54
| José Litux
Registered: March 2013
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:
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]
Report message to a moderator
|Re: Choose database and populate combo box [message #1033539 is a reply to message #1030221]
||Thu, 04 April 2013 06:48
| donino donino
Registered: July 2011
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.01752 seconds