Using same parameter between two datasets



I am designing a report in iReport Designer 4.8.0 and I want to be have two tables in the title section of the report. Ideally, I'd like both datasets to use the same parameter to filter within the query. My thought was to create a parameter in the main dataset, and then a parameter for each of the tables' datasets, and set the default value of the each table's dataset's parameter to the value of the main dataset's parameter. I assumed that when running the report, I would be prompted for the main dataset's parameter and it would be passed to the tables' dataset queries. However, it looks like you can't "share" a parameter between datasets (even within default values of other parameters). Is there another way to accomplish what I am trying to do?


Thanks in advance!

beau.blumberg's picture
Joined: Nov 13 2012 - 5:59am
Last seen: 7 years 4 days ago

1 Answer:

You need to explicitly send the master parameter value to both subdatasets.

In iReport, right click the table in the report inspector, and do Edit table data source/Parameters.



lucianc's picture
Joined: Jul 17 2006 - 1:10am
Last seen: 5 days 51 min ago

This did indeed work. Thank you much for your help!

beau.blumberg - 9 years 8 months ago

And with JasperStudio?

cek.i06go - 8 years 7 months ago