Jump to content
JasperReports Library 7.0 is now available ×

Parsing error


UlrichB

Recommended Posts

Hallo,

currently I try to get started with Jasper Reports with a simple "Hallo World" report from this page:

http://ensode.net/jasperreports_intro.html

 

The XML file looks as follows:

 

Code:
 <?xml version="1.0"?>
<!DOCTYPE jasperReport
PUBLIC "-//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">

<jasperReport name="Simple_Report">
<detail>
<band height="20">
<staticText>
<reportElement x="180" y="0" width="200" height="20"/>
<text><![CDATA[Hello World!]]></text>
</staticText>
</band>
</detail>
</jasperReport>

 

And the test program:

 

Code:
[code]package halloworld;

import net.sf.jasperreports.engine.*;
import java.util.*;

/**
*
* @author bw1banu0
*/
public class Main
{
public static void main(String[] args)
{
JasperReport jasperReport;
JasperPrint jasperPrint;
try
{
jasperReport = JasperCompileManager.compileReport(
"halloworld.jrxml"«»);
jasperPrint = JasperFillManager.fillReport(
jasperReport, new HashMap(), new JREmptyDataSource());
JasperExportManager.exportReportToPdfFile(
jasperPrint, "reports/simple_report.pdf"«»);
}
catch (JRException e)
{
e.printStackTrace();
}
}
}

 

When I run this program I get error messages according attachment.

 

Can anybody help me to fix this?

 

Kind regards - Ulrich [file name=error.txt size=9743]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/error.txt[/file]

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hallo Lucian,

found the compiler and the compilation seems to work now. However I get an error when creating a PDF file. Thank you so far for your help!

Kind regards - Ulrich

 

Post edited by: UlrichB, at: 2006/10/24 10:19

Post edited by: UlrichB, at: 2006/10/24 10:21

Link to comment
Share on other sites

Hallo Lucian,

I've already fixed this error, the package for PDF handling was not yet included. Now I have a problem with iReport - see here:

http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&func=view&id=16893&catid=9

Unfortunately I got no reply to this posting. Is the mailing list a better place to get support?

Kind regards - Ulrich

Link to comment
Share on other sites

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