Any Computer | Any Collection | for Windows, Mac and Linux.
I do not know what if anything about these instructions must be changed for later versions of iReport.
You can now use iReport to build reports against the NM Collector Software database. How to do that is beyond the scope of these instructions but here are some hints.
- Open the Services window (Menu > Window > Services)
- Right click on "Databases" and select "New Connection ..."
- Click Name drop down and select New Driver...
- Click the Add... button and browse to your NM Collector JE installation directory then the nmcswDB folder and open the file named derby.jar
- Click OK to close New JDBC Driver window.
- Leave User Name and Password fields blank.
- Enter a JDBC URL as shown below with a path to your database.jdbc:derby:C:\NMCollectorJE\nmcswDB;create=false
- Under the Advanced tab, ensure "APP" is selected in the "Select Schema:"
- Click OK.
- In the Services window, double click the new connection to open it.
- There is a connections drop down at the top of the iReport 3.6.1 window. Just to the left of it is an icon that looks like a database with a blue power cord plug super imposed on it. Click that icon to open up the "Connections / Datasources" window.
- In that window, click the New button.
- Select NetBeans Database JDBC connection and click Next.
- Name your connection. May I suggest "NM Collector" as an appropriate name?
- Ensure the database service you defined in steps 1 - 10 is selected in the Connection drop down.
- Click the Test button if you want to test your connection. Click Save to continue.
- Close the Connections / Datasources window.
- Now you can select your new connection in the connection drop down at the top of the iReport 3.6.1 window.
- To access the source data query in the iReport, select the report name in the Report Inspector and then look for the Query Text field in the properties window.
- In order to allow people to specify their own captions, the database does not have a simple structure. If you want actual headings and associated data in your reports you have to join tables. Here are some examples that I hope will help.
- FirearmAandD - In this case I knew what the headings were so I built them into the SQL.
- Inventory - In this case I read the actual headings from the database and placed them in one report (Inventory.jrxml) and then placed the associated data in a sub report (Inventory_subreport1.jrxml).
- Here is the source code for all of the current set of reports (as of October 16).
- To familiarize yourself with the database structure you can spend time looking at your own data in the database ...
Last Revised: October 16, 2010
Copyright © 2008, 2009, 2010 by Clayton J. Pryor. All rights reserved.