execute and preview jasper report in pdf format without saving the pdf file somewhere

0

Hi everyone,  Hope you all are doiing fine. I have a problem & I need your help. I'm running jasper *.jrxml files inside my java code. I have used this code to execute the report : JasperExportManager.exportReportToPdfFile(jasperPrint,"report.pdf"); This works fine but the only problem is that the report.pdf is saved in my eclipse folder and I do not want this.

Is it possible to execute and preview jasper report in pdf format without saving it somewhere?

thank youuuu

lina_gsp's picture
Joined: Mar 15 2011 - 12:15am
Last seen: 3 years 6 months ago

1 Answer:

0

Hi,

You can preview the jasperPrint object using JasperViewer. You have to add this to your code:

JasperViewer.viewReport (jasperPrint);

It is not exactly the same ass the pdf file but you can visualize your report this way and then you have the option to save the report in different formats (pdf, rtf, xls...)

Hope this helps.

Regards.

augarte's picture
404
Joined: Jan 27 2010 - 7:20am
Last seen: 8 months 6 days ago
Feedback
randomness