File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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: 10033
    
163

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: 41489
    
  53
What kind of errors? In which line of code?


Ping & DNS - my free Android networking tools app
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: 41489
    
  53
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jasper reports