Jump to content
Changes to the Jaspersoft community edition download ×

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


lina_gsp

Recommended Posts

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

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.

Link to comment
Share on other sites

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