aspose file tools*
The moose likes Other Open Source Projects and the fly likes jasper reports Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "jasper reports" Watch "jasper reports" New topic
Author

jasper reports

sajeevi bangamuwage
Greenhorn

Joined: Jan 19, 2005
Posts: 21
Dear sir/madam,


I have get my first jasper report with the help of youall. Thank you for that.
Tha report was coming as jViewer and it saves HTML file format. But i want to get it to PDF file format.also i want to get it in Acrobar reader.Can you please tell me how can i do the change to my following coding to get from acrobat reader and export to PDF file format.
I have write it as follows.but it gives me errors.

Thank you very much.


String reportSource = "./report/templates/HelloReportWorld.jrxml";
String reportDest = "./report/results/HelloReportWorld.pdf";

Map<String, Object> params = new HashMap<String, Object>();

try
{
JasperReport jasperReport =
JasperCompileManager.compileReport(reportSource);

JasperPrint jasperPrint =
JasperFillManager.fillReport(
jasperReport, params, new JREmptyDataSource());

JasperExportManager.exportReportToPdfFile(
jasperPrint, reportDest);

JasperViewer.viewReport(jasperPrint);
}

catch (JRException ex)
{
ex.printStackTrace();
}
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9329
    
110

I'll move this to our "Other Open Source Project" forum where you might get an answer.


[My Blog] [JavaRanch Journal]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39553
    
  27
What kind of errors? In which line of code?


Ping & DNS - updated with new look and Ping home screen widget
sajeevi bangamuwage
Greenhorn

Joined: Jan 19, 2005
Posts: 21
Thank you for replying me. It gives run time error saying some problem in main
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39553
    
  27
TellTheDetails
sajeevi bangamuwage
Greenhorn

Joined: Jan 19, 2005
Posts: 21
Im sorry to say just now i cant tell the details because im in the lab and i dont have any details with me.i'll try to post you tomorrow and expecting your greate help.
Thank you very much sir.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: jasper reports
 
Similar Threads
Calling iReport from eclipse,JSF
Help me with the calling of jasper reports through java code
NetBeans:JasperReport --> Exception
jasper report to PDF
Jasper report error