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.


Using the Reporting Framework With JasperReports in EPCIS

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:


mkdir ${target_home}/WEB-INF/lib

7. Copy your JasperReports library JAR file.


cp ./jasperreports-0.6.3.jar ${target_home}/WEB-INF/lib/



Note - There is a bug in the JasperReports software which threw the ServletException and displayed "java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable". To workaround it, the user needs to add the following JVM Option in the JVM Settings of the application server and restart the application server:

-Djava.awt.headless=true



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


procedure icon  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.

For example, type:


http://hostname/epcis/

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.


Screen capture showing RFID Information Server Index page. [ D ]

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.


Screen capture showing EPCIS Reporting Framework index page.Screen capture showing Readers Statistics Report query prompt. Reader EPC Number text field is empty. Button is Submit Query.[ D ]

Screen capture showing EPCIS Reporting Framework index page.Screen capture showing Readers Statistics Report query prompt. Reader EPC Number text field is empty. Button is Submit Query.[ D ]

 

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.


Screen capture showing RFID Readers Statistics Report with 10 tags listed.

5. From the Reporting Framework menu, choose Tag Statistics.


Screen capture showing EPCIS Reporting Framework index page.[ D ]


Screen capture showing RFID Tag Statistics Report query prompt. Tag Number text field is empty. Button is Submit Query.

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.


Screen capture showing RFID Tag Statistics Report listing three readers.

7. From the Reporting Framework menu, choose, Tag Association.

The Tag Association query page is displayed.


Screen capture showing RFID Tag Association Report query prompt. Tag Number text field is empty. Button is Submit Query.

8. Enter the Tag Number. For example, urn:epc:id:gid:1.301.1 and click Submit Query.


Screen capture showing RFID Tag Association Report listing one EPC association.