Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyperlink in jasper reports across subreport

I want to add hyperlinks to my report. The hyperlink set in one report should take me to another subreport. Could you please tell me if this is feasible. If it is could you please provide step by step approach to achieve this?

like image 208
Abhinash Avatar asked Feb 03 '26 08:02

Abhinash


1 Answers

First, yes, it is feasible.

Second, here are your step-by-step instructions:

  1. Right click on element you want to link from and select Hyperlink.
  2. Choose Hyperlink target: Blank
  3. Choose Hyperlink type: Reference
  4. In the reference tab, type the url to invoke the subreport (with parameters). For example, in one of my reports I call the ReportController servlet to create the subreport, like so: "./ReportController?reportName=ValidationDetailsChart&reportTitle=Validation%20Details&nParms=3&parmName_1=ORD_NUMBER&parmValue_1=" + $F{ORDER_NUMBER} + "&parmName_2=START_TIME_MS&parmValue_2=&parmName_3=END_TIME_MS&parmValue_3="
  5. Add a tooltip in the Tooltip tab (optional). Note you can reference variable and paramter values in the tooltip.

Note that there are other ways to do this, and your method may vary if you aren't using java and servlets to generate your reports. I would recommend looking at the ireport documentation for further instructions.

like image 74
Jeremy Goodell Avatar answered Feb 05 '26 23:02

Jeremy Goodell