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

How to call a report class....?


2005 IR Help

Recommended Posts

By: feryshirano - feryshirano

How to call a report class....?

2005-10-19 05:33

Well, hello to all!!! What do I have to do to call a Report class inside my program? What component should I use to open the report?A jdialog, a jinternalframe or none of them?

 

 

 

 

By: sagi7 - sagi7

RE: How to call a report class....?

2005-10-20 02:28

Here an example:

 

Class.forName("com.mysql.jdbc.Driver").newInstance();

Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/Mydb","user","pw");

JasperPrint jasperPrint = JasperFillManager.fillReport(args[0], new HashMap(), con);

JasperExportManager.exportReportToPdfFile(jasperPrint, "Auftrag.pdf");

 

where args[0] is the .jasper file.

 

 

 

 

 

By: feryshirano - feryshirano

RE: How to call a report class....?

2005-10-20 04:06

Bug sagi7, that's correct, but I also want to display the report (pdf file) in my program. The pdf file is being displayed by the JasperReporView. is there another way to display the pdf file?Because when the jasperview is open and after i close it, my system also is closed!!!

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