Reputation: 69
I am new to jasper and I'm creating a drill down report.
I followed these steps:
_report
and TITLE_ID
parameters in the hyperlink section.TITLE_ID
.When running the report, the main report is rendering properly. When I click on one slice in the pie chart of the main report the sub-report is rendering with empty data.
Any ideas of what I can do to resolve this issue?
Thanks in advance.
Upvotes: 0
Views: 2625
Reputation: 531
Drilling through from one report to another is handled via the ReportExecution Hyperlink type, when going from a report to a dashboard you will use the Hyperlink type Reference.
Reference: Jasper Wiki: How do I drill through to a dashboard?
Upvotes: 0
Reputation: 18962
You would need to pass data parameters to your subreport in order to get it to retrieve data. What are the parameters for the subreport? Those need to be specified in the hyperlink.
For my subreports, I use a Hyperlink target of Blank, a Hyperlink type of Reference, and a Reference Expression like this:
"./ReportController?reportName=ValidationDetailsChart&hasCSV=true&reportTitle=Validation%20Details&nParms=4&parmName_1=ORD_NUMBER&parmValue_1=" + $F{ORDER_NUMBER} + "&parmName_2=USER_NAME&parmValue_2=" + $F{USERNAME} + "&parmName_3=START_TIME_MS&parmValue_3=" + $F{START_TIME_MS} + "&parmName_4=END_TIME_MS&parmValue_4=" + $F{START_TIME_MS}"
Of course, your scenario may be significantly different, but however you do it, you'll need to pass data parameters to the subreport.
Upvotes: 1