Programming using the BIRT Reporting APIs : Generating reports from an application : Preparing to generate the report : Setting the parameter values for running a report design
 
Setting the parameter values for running a report design
To set the values for parameters for generating a report, use methods on an IRunAndRenderTask or an IRunTask object. These tasks run a report design to generate output. IRenderTask supports reading but not changing the parameters for a report because its source is a report document. The IRunTask object that created the report document already specified the parameter values.
Call setParameterValues( ) to set values for all the parameters in a report design. This method takes a HashMap as an argument. To create a suitable HashMap, use the techniques shown in Listing 12‑6 or Listing 12‑7, earlier in this chapter. To set the value for a single parameter when generating a report, call the setParameterValue( ) method. When the task generates the report or the report document, it uses the default values for any parameters having unset values.