jamshadebay Posted January 10, 2017 Share Posted January 10, 2017 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 _reportand 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 knowwhats 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 More sharing options...
jamshadebay Posted January 10, 2017 Author Share Posted January 10, 2017 forgot to mention that i had choosen hyper link target Blank and hyper link type report execution Link to comment Share on other sites More sharing options...
reportdev Posted January 10, 2017 Share Posted January 10, 2017 try using the new jaspersoft studio and see if it works.ireports is not supported.the hyperlinks will not work in the studio. the report needs to be published into the server for the hyperlinks to be active. Link to comment Share on other sites More sharing options...
jamshadebay Posted January 10, 2017 Author Share Posted January 10, 2017 i am not using a web based application.i am running this report on my local machine.report viewer is not opening in a web application.its opening in a jframe. Link to comment Share on other sites More sharing options...
hozawa Posted January 11, 2017 Share Posted January 11, 2017 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 More sharing options...
jamshadebay Posted January 11, 2017 Author Share Posted January 11, 2017 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 thisImplement 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 thatline i need to open a detailed report on the basis of that field.please help me. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now