Jump to content
Changes to the Jaspersoft community edition download ×

Setting a hyperlink to generate a new report


Recommended Posts

I've created a main report that contains multiple subreports. All athe subreports are working. Within the main report I have a hyperlink that I would like to have it generate a new report (Annotation). The Annotations report has been created. It has one parameter (pnum) and dips a relational database to retrieve any existing annotations for that pnum. My problem is that I don't know how to configure the hyperlink within the main report to execute the Annotations report. I'm assuming that I need to call JRFillManager, JRExporter, etc in order for this to happen. I have java code to perfrom the load, fill and export functions but how do I call them (or a function that will perfrom all of these) within the hyperlink? What is the syntax within the hyperlink to do this?


Attached is the main report jrxml. Any suggestions, supporting sample code would be appreciated. I have reviewed the demo/samples/hyperlink code and reviewed the hyperlink sections within the iReport User Manual and JasperReport Ultimate Guide.


[file name=devSubreportR1.jrxml size=18815]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/devSubreportR1.jrxml[/file]

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I'm facing the same situation here¡¡ I need to achieve an hyperlink to generate a new report passing a Parameter.

Any idea how to do that???


Any suggestion, help or something will be really appreciated...


Thanks a lot in advance...






Link to comment
Share on other sites



If you successfully managed to generate some JasperReports documents, you probably realized by now that JasperReports is not a Web application, but rather a library that cannot run by its own and has to be embedded into some other parent application.


So I guess you are using JasperReports in a Web application of your own. It means that you should know by now how Web applications work. And if you do, then you must figure out that when a hyperlink is clicked, there is a servlet or a JSP on the server that responds to that call and sends you back a response.


If this does not make any sense to you so far, then you should give up this approach.

You should probably get JasperServer and try to go from there. JasperServer comes with a sample data base in which one of the reports has a link in it pointing to another report with a parameter.


I hope this helps.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...