Link a Dynamic Report parameter to a Data Set parameter (BIRT)
BIRT provides support for Report Parameters and Data Set Parameters. Report Parameters are scoped for the entire report whereas Data Set Parameters are used within the confines of a Data Set. Data Set parameters are usually set by linking them to a report parameter or tying them to a data element within a nested Table by using the binding tab.
Report Parameters can be static or dynamic. A dynamic parameter gets is selection list from an existing data set. This example illustrates adding a dynamic Report Parameter and then linking this Report Parameter to a Data Set Parameter to cull the data returned.
BIRT Version Compatibility
This Example was built and tested with BIRT 2.1.2
Add a URL to your bugzilla attachment. eg. Example Report
First create a data set for the future dynamic Report Parameter. In this example a dynamic Report Parameter will be created to display a list of order numbers. So we create a data set with the following query.
select CLASSICMODELS.ORDERS.ORDERNUMBER from CLASSICMODELS.ORDERS
Next we create the Report Parameter and select the dynamic radial. Select the data set just created and set the default value to 10100. This is illustrated below.
Finally we create a data set that gets the details for a specific order number.
select * from orderdetails where ordernumber = ?
In the Data Set Editor, select the parameters entry, click on the link to report parameter column and select the parameter just created. Drag the new data set to the canvas and run the report.
Please enter comments below by selecting the edit icon to the right. You will need a Bugzilla account to add comments.