I have 2 bar charts in my report, each using 2 different subdatasets. My main query is something like "select * from user_levels" which is used only as a placeholder so that the main report can render the bar charts correctly, instead of displaying nothing.
My question is: how can I pass the same value/parameter at runtime into the 2 subdatasets? Does the parameter need to be only passed from the main query or can it be unrelated to the main query?
If anyone can please list out the steps specific to Jaspersoft Studio, I would be very grateful. I have spent at least 5 days on this so far.
Thanks for your time and help.
Each dataset is independent; its fields are separated from the main dataset and also from other datasets and subdatasets.
There is a good tutorial on working with datasets in Jaspersoft Studio available here: http://community.jaspersoft.com/wiki/creating-charts-and-datasets-jasper...
The value for sub-datasets parameters are set by using the dataset run, which is part of each element that makes use of a sub-dataset. The dataset run is used to set the datasource that will produce the data for the sub-dataset, and also the parameters. The value for each parameter is set with an expression in which is possible to use all the main dataset objects, including parameters. This means that you can use main-dataset parameters to set the value of sub-dataset parameters.