13.07.2015 Views

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

iReport Ultimate Guide - Nimsoft Library

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Getting StartedThe Data Sources drop-down menu allows you to select the active data source; the ◄ button on the left opens the Data Sourceswindow:Figure 2-13Data Sources Drop-Down Menu2.10 Creating Your First ReportNow that you have installed and configured <strong>iReport</strong> and prepared a JDBC connection to the database, you will proceed tocreate a simple report using the Wizard.For this example and many of those following, you will use HSQLDB, a small relational database written in Java and suppliedwith a JDBC driver. You can learn more about this small jewel by visiting the HSQLDB web site.2.10.1 Using the Sample DatabaseFor sample reports, we will use the sample database that comes with JasperReports.Download JasperReports (the biggest distribution) and unpack it. Open a command prompt (or a shell) and change to the/demo/hsqldb. IIf you have Ant (and you know what it is), just run:ant runServerOtherwise, run this command (all in a single line):java -cp ..\..\lib\hsqldb-1.7.1.jar org.hsqldb.ServerThe database server will start and we will be ready to use it with <strong>iReport</strong>.2.10.2 Using the Report WizardThe table below lists the parameters you should use to connect to the sample database:ParameterNameJDBC DriverJDBC URLUsernameValueJasperReports Sampleorg.hsqldb.jdbcDriverjdbc:hsqldb:hsql://localhostsaPasswordWhen the password is blank, as in this case, remember to set the Save password check box when configuring the connection.1. Click File → Report Wizard. This loads a wizard (Figure 2-14) for the step-by-step creation of a report, starting with theselection of the template followed by the selection of the name and the location of the new report.25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!