Search code examples
jasper-reportsireport

Return value from subdataset in iReport


I know that it is possible to get a return value from a subreport to the main report in iReport. Also there are subdatasets which can also have an own SQL query like a subreport. As I understand a subdataset can only be used with list, charts etc., but I don't know how to access the subdataset fields, variables and parameters in the main dataset/report.

Is it also possible to get a return value from a subdataset? If not, how is it possible to access values from the subdataset?


Solution

  • It is currently not possible to use a subdataset query in the main report structure. Your best option would be to use a table element, possibly only outputting one field to accomplish what you want to do.

    Otherwise you would need to restructure your query to accommodate your needs to have data in the main report.