Jump to content
Changes to the Jaspersoft community edition download ×

jasper report not working correctly


m_qasim26

Recommended Posts

Hi,

 

I am using jasper report in my desktop application, in start 5,6 times report is running correctly and then halts the application. Can anyone help me that how this problem can be solved. Below is the code that I am using.

 

Code:
            Map params = new HashMap();
params.put("Id",25);
InputStream reportSource = ClassLoader.getSystemClassLoader().getSystemResourceAsStream("templates/account.jasper"«»);
JasperReport jasperReport = (JasperReport) JRLoader.loadObject(reportSource);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, DBUtil.getConnection());
JasperViewer viewer = new JasperViewer(jasperPrint,false);
viewer.setVisible(true);
viewer.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
reportSource.close();
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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