Jump to content
We've recently updated our Privacy Statement, available here ×

hyper link not working on ireport


jamshadebay

Recommended Posts

hi is it possible to open another report from by button click in ireport,right now i am very frustrated.i created a sample report using ireport 5.6.0.added hyperlink for a text.added  link parameter as _report

and value as "C:/doc/dor.jasperl".i am not using ant other parameter for this report.since it is a just a test.but it is not opening at all.i don't get any erros.i had copied dor.jasper and dor.jrxml to c:/doc/dor.i don't know

whats wrong with my code.i think its not possible to open local reports.since this is not web based application.i am using a swing java application.please help me.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hyperlinks are NOT supported in Java views by default. Hyperlinks works if you export to HTML or pdf

 

According to JasperReports documentations,

"To handle custom hyperlinks in the built-in Swing viewer, you need to register a hyperlink listener by calling addHyperlinkListener(listener) on the net.sf.jasperreports.view.JRViewer component. The listener is an implementation of the JRHyperlinkListener interface. When a report hyperlink gets clicked, the listener queries the hyperlink type and performs the desired actions. "

Link to comment
Share on other sites

will you give me a plain example for hyperlink reportexecution.this is what i have done so far.

net.sf.jasperreports.swing.JRViewer viewer = new net.sf.jasperreports.swing.JRViewer(JasperFillManager.fillReport("C:\doc\stdoclst.jasper", parameters, new Db().con));
            Container c = getContentPane();
            c.add(viewer);
            this.setVisible(true);

this report is coming fine.but when i click on hyperlink nothing happens.the system out print line prints this

Implement your own JRHyperlinkListener to manage this type of event.
Hyperlink of type ReportExecution. please help me i am stuck.i am ready to try any other methods.what i need is i have a summary report.when i click on that

line i need to open a detailed report on the basis of that field.please help me.

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...