For this scenario i want to pass main report parameter to subreport....
then i want to check
if(main_report_parameter.equals(sub_report_parameter)){
that sub_report only display here....
}
or
any possible is there check like this
if(main_report_parameter.equals("personal"){
that sub_report only display here....
}
1 Answer:
Hi ,
You can easily pass the parameters to the subreports from the main report and viceversa . For this you can go to the properties of the subreport and there in the end you can find Parameters. Now in here you can click add and specify the name of the parameter of the subreport which would recieve the value from the main report , basically you need to map the parameters of subreports and the main report.
If you want to pass the data from the subreport to the main report then you need to specify the Return values in the properties of the subreport and do same mapping here .
If you want to do this programatically then refer to
http://www.tutorialspoint.com/jasper_reports/jasper_create_subreports.htm
Hope that this helps.
Thanks,
Ankur Gupta.
If my answer satisfies your query please select it as the best answer, by clicking the tick next to to my answer
Thanks in advance
Ankur Gupta