C H A P T E R 3 |
RFID Information Server Reporting Framework |
This chapter describes an example of using the Sun Java System RFID Software reporting framework.
This example uses the open source JasperReports project from SourceForge.net. JasperReports provides a free, open source Java reporting library. XML report templates are used to generate ready to print documents using data from customizable data sources, including JDBC. The output can be delivered to the screen, printer, or stored in PDF, HTML, XLS, CSV and XML format.
If you want to use the example reporting JSP files (DisplayEpcisTables.jsp, ReadersStatistics.jsp, TagStatistics.jsp, and TagAssociation.jsp) provided in the target_home directory, you must change the names of the JasperReports JAR file, JDBC driver, JDBC URL, username, and password to match your environment before using them. The reporting framework codes provided only serve as an example and NOT a recommended way to develop reporting codes.
1. Locate RFID Information Server's target directory. The variable target_home is used to represent the target directory.
2. Before copying your application to the target_home, configure the correct parameters of your database in your application JSP files. For example, JDBC driver, hostname, port number, username/password, in your application must match your environment.
3. Copy the application JSP files to target_home. For example, the following three sample files:
cp ./ReadersStatistics.jsp target_home/. cp ./TagStatistics.jsp target_home/. cp ./TagAssociation.jsp target_home/. |
4. Copy your JasperReports report design XML file to target_home. For example, using the sample files, type:
cp ./ReadersStatistics.jrxml target_home cp ./TagStatistics.jrxml target_home cp ./TagAssociation.jrxml target_home |
5. Download JasperReports from SourceForge.net if you have not already done so.
http://sourceforge.net/projects/jasperreports/
6. Create a lib directory under WEB-INF if it doesn't exist:
7. Copy your JasperReports library JAR file.
8. Restart the application server.
9. Now you are ready to view the reports. See procedure To Launch the Reporting Framework and Display the Reports
|
1. Verify that your database server is running.
2. Open a web browser and access RFID Information Server Index page by typing the proper URL for your RFID Information Server installation.
Replace the variable, hostname, with the host name of the machine where RFID Information Server is installed. The RFID Information Server Index page is displayed.
3. Choose EPCIS Reporting Framework > Readers Statistics.
If you are prompted to do so, enter the User Name and Password. The User Name and Password are those that are used during configuration of the application server to create a security file realm user. See Sun Java System RFID Software 2.0 Installation Guide, Chapter 4 for details.
4. Enter the Reader EPC Number, for example. urn:epc:id:gid:1.700.2 and click Submit Query.
The Readers Statistics Report is displayed in your browser.
5. From the Reporting Framework menu, choose Tag Statistics.
6. Enter the Tag Number, for example, urn:epc:id:gid:1.301.1 and click Submit Query.
The Tag Statistics Report is displayed in your browser.
7. From the Reporting Framework menu, choose, Tag Association.
The Tag Association query page is displayed.
8. Enter the Tag Number. For example, urn:epc:id:gid:1.301.1 and click Submit Query.
Copyright © 2004, Sun Microsystems, Inc. All Rights Reserved.