Jump to content
Changes to the Jaspersoft community edition download ×

System.exit(0)


2005 IR Help

Recommended Posts

By: Maxim - lazy-max

System.exit(0)

2004-11-11 04:10

I not like insert System.exit(0) in my application. How can I "close" JasperReports instance correctly without System.exit(0)?

 

 

 

 

By: Teodor Danciu - teodord

RE: System.exit(0)

2004-11-11 04:42

 

Hi,

 

The JasperViewer has special contructors that receive

a boolean called "isExitOnClose".

 

I hope this helps.

Teodor

 

 

 

 

 

By: Maxim - lazy-max

RE: System.exit(0)

2004-11-11 05:05

I want to generate PDF from my application only.

I not use "JasperViewer":

JasperReport reportDef = JasperManager.loadReport(new FileInputStream(jasperTemplateName));

HashMap parameters = new HashMap ();

JRParameter[] params = reportDef.getParameters();

JasperPrint printImage = JasperFillManager.fillReport(reportDef, parameters, new JREmptyDataSource());

return JasperExportManager.exportReportToPdf(printImage);

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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