.:Tutorial One
 Home
 Screenshots
 Docs
 Download
 Project page
Tutorial One: How to compile and preview reports from iReport

In this tutorial we will see how configuring iReports and how to create, compile and preview a simple report with Jasperreports and the IReportCompiler class

Step1: configuration of iReport
1) Select the menu Database->classpath...
2) Complete Microsoft JVM classpath to your JDBC drivers
3) Complete Java VM classpath to your JDBC drivers, tools.jar and jar files of JasperReports:
   X:\path\to\jasperreports-0.4.2-project\JasperReports\lib\commons-beanutils.jar
   X:\path\to\jasperreports-0.4.2-project\JasperReports\lib\commons-collections.jar
   X:\path\to\jasperreports-0.4.2-project\JasperReports\lib\commons-digester.jar
   X:\path\to\jasperreports-0.4.2-project\JasperReports\lib\itext-0.92.jar
   X:\path\to\jasperreports-0.4.2-project\JasperReports\lib\jasperreports.jar
   X:\path\to\jasperreports-0.4.2-project\JasperReports\lib\xerces.jar
4) Set java home (iReport search for installed JDK exploring the windows registry)




Step2: the first report (no database connection required)
1) Create a new report named "mydoc"
2) Add a static text element to the title band
   Pay ever attention to the band linked to your elements !!!
3) Modify the size of font (-->*"FOR EXAMPLE, IF YOU WANT SET SIZE=30*<--) (if it not change, click on font name field and press the tab key... ;-)
4) Align the text to center and modify it
5) Save in a file named mydoc.xml




Step3: it's time to compiling
1) Select menu edit->compile...
2) Check the XML file name
3) Press the "compile" button
4) If all worked correctly, without error, you have successfully compiled your first document using iReport




Now, you are ready to compiling JasperReports samples

Return to docs


(c) 2002 by Giulio Toffoli <gt78 at businesslogic.it>