I am new to Birt reporting.I have one doubt.I need two report parameter as listbox. One is “country: and second is “state”.Depending on Selected country, state list box should be filled with states belongs to selected country.How can i do this? .How many dataset i need to create?
Share
This problem can be solved using cascade parameter groups.
You will need 2 DataSet to create this report.
First DataSet:
SELECT country
FROM table_country_state
Second DataSet:
SELECT State
FROM table_country_state
WHERE country = ?
This ‘?’ is a reference to a parameter you will have in cascade parameter group. (You will have an error, because you didn’t set it yet, so just ignore for while).
Now you can create your cascade parameter group. Name as you wish and “add” two parameters in multi Data Set option. The first parameter will be country (with the First DataSet and Value = country). The second will be State (same logic as country). After add them, u can edit how they will be looked like… in your case, List Box.
After all, you can go back to the second DataSet and add a parameter (in parameter section). You will like the parameter with your country parameter.
Tip: if you don’t need multiple selections, as it looks like, use combo box types.
You can check an example here: http://www.eclipse.org/birt/phoenix/examples/reports/birt2.1/cascade/index.php