Jump to content
Changes to the Jaspersoft community edition download ×

JasperReports ErroR


2005 IR Help

Recommended Posts

By: rray - russr

JasperReports ErroR

2004-05-13 11:34

I am getting this error when I try to create a report.

 

java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte: method transform(Ljava/awt/geom/AffineTransform;)V not found

at dori.jasper.engine.JasperExportManager.exportReportToPdfStream(JasperExportManager.java:172)

at com.intergraph.etims.reporting.agent.ETIMSAgent.createReport(ETIMSAgent.java:203)

at com.intergraph.etims.reporting.ReportsManager.createTOMAReport(ReportsManager.java:357)

at com.intergraph.etims.reporting.ReportsManager.main(ReportsManager.java:391)

at dori.jasper.engine.JasperExportManager.exportReportToPdfStream(JasperExportManager.java:172)

at com.intergraph.etims.reporting.agent.ETIMSAgent.createReport(ETIMSAgent.java:203)

at com.intergraph.etims.reporting.ReportsManager.main(ReportsManager.java:391)

 

 

 

public void createReport( String jasperFile,

String query,

HashMap param,

String rptFormat,

ByteArrayOutputStream ostream)

throws AgentException

{

ResultSet rs = null;

boolean debug = false;

Class thisClass = null;

 

 

 

try

{

thisClass = Class.forName(PACKAGE_NAME+ "."+ CLASS_NAME);

Connection conn = dbConnection();

if(conn == null)

{

throw new AgentException("100", "Can't connect to the database");

}

Statement stmt = conn.createStatement();

rs = stmt.executeQuery(query);

 

 

// run Jasper Report here

//have to get resource

//will look in bin directory

InputStream jasperStream = thisClass.getClassLoader().getResourceAsStream(jasperFile);

JasperReport report = JasperManager.loadReport(thisClass.getClassLoader().getResourceAsStream(jasperFile));

JasperReport report2 = (JasperReport)JRLoader.loadObject(jasperStream);

JasperPrint jasperPrint = JasperFillManager.fillReport( report2, null, new JRResultSetDataSource(rs));

 

if (rptFormat.equals(PDF_FORMAT))

{

Error comes from here >>> JasperExportManager.exportReportToPdfStream( jasperPrint, ostream);

}

 

 

 

 

 

By: rray - russr

RE: JasperReports Error

2004-05-13 13:26

This error is caused by the fact the wrong jar file for iText was being used. The current version should be 1.02 for iText.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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