Sub Report Parameter

0

Hi, currently building a report based on project information from the DWH, I also need to get some data from the transactional database (as this info is unable to be put into the DWH) The main report is using the DWH Bean and have created a sub report using the PPM bean. 

I need the sub report to be based on the project info of the main report, so how do I pass the project ID as a parameter into the sub-report?

Thanks!

georgia.bloy's picture
Joined: Sep 13 2018 - 4:45am
Last seen: 7 months 1 week ago

1 Answer:

0

Hi georgia. 

So in your subreport your need to create a parameter. Lets call it $P{subparam}
- So make the change in the subreport.jrxml and then save and then compile to generate/update the subreport.jasper. 
Then in Main report, select the sub report element. 
In the properties tab, select tab "Subreport" , then select "Edit Parameters"
Then Add
The in Parameter name it will be subparam 
then the parameter expression would be what ever you want to pass from main. 

Hope this helps. 
Cheers.



 

joseng62's picture
620
Joined: Dec 5 2014 - 2:43am
Last seen: 1 month 5 days ago
Feedback
randomness