explorer Posted October 1, 2010 Share Posted October 1, 2010 Hi All, I am using Jasper Reports 3.7.5 and JDK 1.6 (update 20). The report launched from my application running inside the Netbeans IDE 6.9 runs perfectly well.However, when the report is launched from the application outside of the IDE, nothing happens (no even an exception is shown). All the required jars are on the applicatons' classpath. The report path is not hard-coded, and I have verified that at runtime the report path is correct.Please suggest what could be the reason for this strange behavior?Thanks. Code:try { jasperPrint = JasperFillManager.fillReport( reportPath, hashMap, dataSource); //no code executes afte this line. Not even an exception is thrown if(jasperPrint == null) { JOptionPane.showMessageDialog(null, "Jasper print is null"); } else { JOptionPane.showMessageDialog(null, "Jasper print is not null"); } } catch (JRException e) { JOptionPane.showMessageDialog(null, e.getMessage()); } catch (Exception e) { JOptionPane.showMessageDialog(null, e.getMessage()); } JasperViewer jasperViewer = new JasperViewer(jasperPrint, false); jasperViewer.setTitle("Report Viewer"); jasperViewer.setVisible(true); JOptionPane.showMessageDialog(null, "Report Printed");// end of code Link to comment Share on other sites More sharing options...
Teodor Danciu Posted October 1, 2010 Share Posted October 1, 2010 Hi, Without an exception stack trace it is impossible to tell what is wrong.The most likely reason for not seeing any error is because you catch them and don't report them. Something like an emtpy catch block. We did not see your catch block in the code you posted. I hope this helps.Teodor 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