UlrichB Posted October 24, 2006 Share Posted October 24, 2006 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 More sharing options...
lucianc Posted October 24, 2006 Share Posted October 24, 2006 Remove any line/empty space before <?xml ... HTH,Lucian Link to comment Share on other sites More sharing options...
UlrichB Posted October 24, 2006 Author Share Posted October 24, 2006 Hallo Lucian,than you for your answer. This helped and fixed the error above. But now I got a new error - see attachment.Kind regards - UlrichPS: I'm working on SUN Solaris [file name=error2.txt size=5744]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/error2.txt[/file]Post edited by: UlrichB, at: 2006/10/24 09:00 Link to comment Share on other sites More sharing options...
lucianc Posted October 24, 2006 Share Posted October 24, 2006 Put the Eclipse JDT compiler jar on your classpath. Link to comment Share on other sites More sharing options...
UlrichB Posted October 24, 2006 Author Share Posted October 24, 2006 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:19Post edited by: UlrichB, at: 2006/10/24 10:21 Link to comment Share on other sites More sharing options...
lucianc Posted October 24, 2006 Share Posted October 24, 2006 What error do you get? Post the full exception stacktrace.. Link to comment Share on other sites More sharing options...
UlrichB Posted October 25, 2006 Author Share Posted October 25, 2006 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=9Unfortunately 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 More sharing options...
lucianc Posted October 25, 2006 Share Posted October 25, 2006 Which mailing list, the one from sourceforge.net? Afaik, the JasperForge forums were meant to become the single discussion/support place for JR and iReport, replacing the sourceforge.net forums and mailing lists. Therefore the iReport forum is the place to post your question. If you think it's a bug, then you'd log it here Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now