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 Generating JasperReport  in PDF 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 "Generating JasperReport  in PDF" Watch "Generating JasperReport  in PDF" New topic
Author

Generating JasperReport in PDF

Vivek Nikam
Greenhorn

Joined: Aug 27, 2011
Posts: 5
While generating JasperReport in PDF, I am getting following error
"main" java.lang.NoClassDefFoundError: com/lowagie/text/DocumentException
I am new to the report generation, I don't have much of knowledge about it,
so can you please help me? Please

I am using Eclipse.

I have included all related jars in path
itextpdf-5.2.0.jar,
commons-collections-3.2.1.jar,
commons-beanutils-1.8.2.jar,
commons-javaflow-20060411.jar,
commons-logging-1.1.jar,
jasperreports-4.5.0.jar,
commons-digester-1.7.jar,
groovy-all-1.7.5.jar,
classes12.jar



JasperDesign jasperDesign=JRXmlLoader.load("jrxml-file-path");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
Map parameters = new HashMap();
parameters.put("EMPNO","1234");
Connection conn = DataBase.getConnection();
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, conn);
JasperExportManager.exportReportToPdfFile(jasperPrint,"pdf-File-path");
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generating JasperReport in PDF