Jump to: navigation, search

Link a Dynamic Report parameter to a Data Set parameter (BIRT)

< To: Report Developer Examples (BIRT)
This example is Bugzilla ID 187361. If you would like to contribute an example see the example contribution guidelines.

Introduction

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

Example Files

Add a URL to your bugzilla attachment. eg. Example Report

Description

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.

Dynamicparameter(BIRT).PNG

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.


Comments

Please enter comments below by selecting the edit icon to the right. You will need a Bugzilla account to add comments.