Programming using the BIRT Reporting APIs : Programming the structure of a report design : Accessing a data source and data set with the API : Using a data set programmatically
 
Using a data set programmatically
Typically, a reporting application uses data sets and data sources already defined in the report design. Use the data set’s setDataSource( ) method to change the data source of a data set. For example, based on the name of the user of the reporting application, access data from the sales database for a particular geographical region, such as Europe or North America.
Changing the properties of a data set
Changing the properties of a data set requires consideration of the impact on the report design. If the application changes the data source of a data set, the type of the data source must be appropriate for the type of the data set. Also ensure that the new data source provides the same data fields as the original data source.