How to pass main report's parameter to subreport

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....

}

 

udumanajmeer's picture
Joined: Jun 4 2013 - 9:00pm
Last seen: 7 years 7 months ago

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.

 

Ankur Gupta's picture
Joined: Jan 21 2013 - 10:36pm
Last seen: 4 months 1 week ago

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

Ankur Gupta - 9 years 11 months ago
Feedback
randomness