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

Viewing of jasper report in pdf format from java


nikitha

Recommended Posts

Hi,

I have a requirement to get the pdf format report from the java code using jasper reports, i have seen many examples, we have only jasper viewer to view the report from the java program.

My requirement, is when i compile  a java program, a report has to be viewed in pdf format.

The code which i am using is:

 

JasperPrint jprint = (JasperPrint) JasperFillManager.fillReport(jasperFileName, parameters, con);

JasperExportManager.exportReportToPdfFile(jprint, pdfFileName);

JasperViewer.viewReport(jprint,true)

----> here, this line says that to view in the jasper viewer.

But, i need to view in PDF format.

Please help me. 

 

 Thanks and Regards,

Naveen 

 

 

 

 

 

 

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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