Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generating JasperReport in PDF

 
Vivek Nikam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic