Hyperlinks in Reports with REST API integration

Hello community,


we evaluate the embedding of Jasper reports in our web application using the REST API.

I've got a report (created with iReport) with hyperlinks in it, referencing another reports in tre repository and passing them parameters.

Since I'm using the REST API for integrating the report in our app, the "ReportExecution" hyperlink type wouldn't work. I also tried another hyperlink types and the only one working within this context is the "Reference" type. There I have though to use the Hyperlink Reference Expression and

-use an absolute url to the linked report

-concatenate the parameters needed to the Hyperlink Reference Expression instead of passing them ("Link parameters")

Here my question: is there another way of using hyperlinks in order to achieve the same (have hyperlinks + pass parameters + use the REST API).


Thanks & best regards,


peter_tonev's picture
Joined: Jun 24 2013 - 4:45am
Last seen: 9 years 10 months ago

1 Answer:

The "ReportExecution" hyperlink type is ment to work inside the Jasper Server environment, so when using REST web services to receive the output of a report the underlying architecture to support that type of link is not there since the report is rendered outside JRS.

So you will need to mimic the Report Execurion hyperlink functionality inside your application using a reference Hyperlink. You may create a wrapper in your application that can handle this type of requests and calls the specific report, for example:

Let's say your wrapper lives @ http://myapp.com/jrs-call and receives a parameter with the report URI and a set of key/value pairs for the report parameters needed. Set the links in your repoorts as "reference" and point them to your wrapper with all the parameters needed like http://myapp.com/jrs-call?report=/public/AllAccounts&param1=value1&param... , etc.

Then that wrapper can do the proper REST calles to execute the report needed.

marianol's picture
Joined: Sep 13 2011 - 8:04am
Last seen: 4 years 11 months ago