|Re: Report parameters [message #634119 is a reply to message #634102]
||Wed, 20 October 2010 14:59
| Richard A. Polunsky
Registered: July 2009
Location: Houston TX
It does seem to skip that step, doesn't it.|
Okay. Here's an example. Using the Classic Models sample database, I create a dataset as Select * from Customers where State = ?
Next I drag the dataset onto the report canvas (which creates a Table object). As you noticed, you can run the report like this and you won't get prompted for the parameter value. That's because the dataset parameter has been created but it hasn't been linked to any report-level parameter.
There are two ways to accomplish that step. You can either go under the Data Explorer to the Report Parameters section, define one there, then go back to the Data Set in the Parameters section and link the two together, or you cao do both through the Data Set in the Parameters section.
In the Data Set Parameters, edit the parameter that was created when you saved your original query. It probably has a creative name like "param_1". At the bottom of the edit dialog is a line tagged "Linked to Report Parameter" with a dropdown of "None". Click on the formula button at the right of the dropdown.
In the resulting box (which should default to string data type), accept all of the defaults with one change - make sure you check the box tagged "Is Required", then click OK. The dataset parameter dialog should now show as Linked to Report Parameter "NewParameter1". Click OK, then click OK on the Edit Data Set dialog.
Now when you run the report, you will be prompted for your parameter entry.
I'm pretty sure all of this is in both of the BIRT user guides:
BIRT - A Field Guide to Reporting (Addison-Wesley)
Practical Data Analysis and Reporting with BIRT (PACKT Publishing)
Powered by FUDForum
. Page generated in 0.05181 seconds