# Generating WebLogic RFID Enterprise Server Reports

# Generating, Viewing, and Exporting Reports

WebLogic RFID Enterprise Server includes the Reporting Service for generating standard reports. You specify selection criteria for the reports and view the reports through the Reporting Service Console, which is a Web-based user interface available to users with access to the enterprise network.

This chapter contains the following sections:

- Reports Available from the Reporting Service
- Displaying the Reporting Service Console
- Generating and Viewing Reports
- Exporting Reports

## Reports Available from the Reporting Service

The Reporting Service provides four types of reports, which are accessed via the Reporting Service Console:

- History: Where and when were assets seen, and in what context. You can use this kind of report to track how assets flow within a system.
- Missing Assets: Which assets have not been seen in a specified period of time, and optionally, at a specified location. You can use this kind of report to track missing assets.
- Dwell Time: How long assets remained at a specified location. You can use this kind of report to find out if assets are moving out of locations at the desired rate.
- Transit Time: How long it took for assets to move from one read point to another. You can use this kind of report to see if assets are moving through the process at the desired rate.

There is no programmatic access to the Reporting Service; the Reporting Service Console is the only way to generate reports.

## Displaying the Reporting Service Console

To display the Reporting Service Console:

1. Start WebLogic RFID Enterprise Server.
2. Open the WebLogic RFID Enterprise Server Home page at `http://``server``:``port``/enterprise/`.
3. Click Reporting Service Console.

## Generating and Viewing Reports

The Reporting Service Console contains one tab for each kind of report. To generate each kind of report:

1. Select the tab for the kind of report you want to generate.
2. Fill in the parameters on which you want to base the report.
3. Click Run Report.

The results are displayed in the same tab from in which you specified the parameters for generating the report. You can also export reports to other formats. See Exporting Reports.

Every record in a report shows an asset associated with at least one ObjectEvent, TransactionEvent, or AggregationEvent, as well as other information pertinent to the type of report and the options set when generating the report.

### Taking Advantage of Master Data

When master data is defined for business locations, business steps, dispositions, EPC classes, or read points that appear in the fields of a report, the master data values are displayed in those fields instead of "raw" identifiers such as a URNs. The master data value that is displayed is the value of the first attribute defined for that type of data.

For example, consider an event that occurs at a read point whose URN is `urn:bea:readPoint27`. The first attribute defined for read points in the master data repository is Name, and the value assigned to the Name attribute for the read point in this example is "South loading dock." Therefore, whenever that read point is shown in a report, the string "South loading dock." is shown, not `urn:bea:readPoint27`.

Master data values, if they exist, are also included in exported CSV reports. See Exporting in Comma-Separated Value (CSV) Format.

For more information about master data, see Master Data in Understanding the Event, Master Data, and Data Exchange Services.

### Navigating Through Multi-page Reports

A report may contain more entries than can be displayed on a single page in the Console. In that case, use the controls at the top or bottom of the report to navigate to the other pages:

To go directly to a page, enter the number of the page in the Go to: field and click Go to:.

### Sorting Data in a Report

When you specify the selection criteria for a report, you can select an initial sort order from the Sort By list in the Set Report Options section the page.

After you generate the report and are viewing it online, you can re-sort the records by clicking on any column header label that appears as a hyperlink. For example, you might sort by EPCs in the initial run of the report. But while you are viewing the report, you can click the Event Type column header label to sort by event type.

## Exporting Reports

You can export reports in CSV and XML formats, as explained below. In either case, when you choose to export the report, you may be prompted to choose a location for saving the file or you may be prompted to open the report in an application, depending on your Web browser.

### Exporting in Comma-Separated Value (CSV) Format

Click Export as CSV to save the report to a file in Comma-Separated Value (CSV) format. Each record appears on a separate line, and each item in a record is separated by a comma. The CSV data is displayed in the same order they appear in the Console. CSV files can be opened in Microsoft Excel and compatible spreadsheet applications.

Listing 2-1 shows a fragment of an XML history report with an ObjectEvent and an AggregationEvent.

Listing 2-1 Fragment of a Report in CSV Format

    urn:epc:id:gid:1111.1110.1,Product 12H87,OBJECT,12/17/2001 4:30,urn:company:warehouse1,San Jose Warehouse,,,,,urn:company:warehouse1:taggingStation23,Slap and ship station

    urn:epc:id:gid:1111.1110.1,Product 12H87,AGGREGATION with parent urn:epc:id:gid:1111.1110.5,12/18/2001 4:30,urn:company:warehouse1,San Jose Warehouse,,,,,urn:company:warehouse1:dockDoor23,Dock Door 7 EAST

When master data exists for an option, for example business location or disposition, the master data value follows the URI in the record (separated by a comma). For example, in Listing 2-1, "San Jose Warehouse" is the master data value for the business location `urn:company:warehouse1`.

### Exporting in XML Format

Click Export as XML to save the report as an XML file.

The entire report is defined in an `<epcisReport>` element. Each record in the report is defined in a `<reportEntry>` element, which contains an `<epc>` element and an `<EventList>` element:

- The `<epc>` element contains the EPC that identifies the reported asset.
- The `<EventList>` element and its children contain information about the reported event associated with the asset in this record.

The `<EventList>` element and its children are defined in the EPCglobal version 1.0 XML Schema Definition (XSD), which defines the XML used by RFID Enterprise Server to format EPCIS event data for transfer and storage. For more information, see Event Service in Understanding the Event, Master Data, and Data Exchange Services.

Listing 2-2 shows the XSD that defines the XML exported by the Reporting Service.

Listing 2-2 XSD for Reports Exported as XML

    <xsd:element name="EventReport" type="EventReportType"/>
        <xsd:complexType name="EventReportType">
            <xsd:element name="ReportEntry" type="ReportEntryType"
                minOccurs="1" maxOccurs="unbounded"/>
        </xsd:complexType>
        <xsd:complexType name="ReportEntryType">
            <xsd:sequence>
                <xsd:element name="epc" type="epcglobal:EPC"
                    minOccurs="1" maxOccurs="1"/>
                <xsd:element name="EventList" type="epcis:EventListType"
                    minOccurs="1" maxOccurs="1"/>
                <xsd:any namespace="##other" processContents="lax"
                    minOccurs="0" maxOccurs="unbounded"/>
            </xsd:sequence>
        <xsd:anyAttribute processContents="lax"/>
    </xsd:complexType>

Listing 2-3 shows a fragment of an XML report with two assets, one associated with an ObjectEvent and another associated with an AggregationEvent.

Listing 2-3 Fragment of a Report in XML Format

    <?xml version="1.0" encoding="UTF-8"?>

    <epcisReport xmlns="http://www.bea.com/ns/rfid/enterprise/epcis-reports/xsd/2.0">
    <reportEntry>
            <epc>urn:epc:id:gid:1111.1110.1</epc>
            <ns5:EventList xmlns:ns4="http://www.bea.com/ns/rfid/enterprise/epcis-capture/xsd/2.0/" xmlns:ns7="http://www.bea.com/ns/rfid/enterprise/epcis-masterdata/xsd/2.0" xmlns:ns3="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:ns5="urn:epcglobal:epcis:xsd:1" xmlns:ns2="urn:epcglobal:epcis-query:xsd:1" xmlns:ns6="urn:epcglobal:epcis-masterdata:xsd:1">
            <ObjectEvent>
                <eventTime>2001-12-17T04:30:47.000-05:00</eventTime>
                <recordTime>2006-09-25T12:33:40.859-04:00</recordTime>
                <epcList>
                   <epc>urn:epc:id:gid:1111.1110.1</epc>
                    <epc>urn:epc:id:gid:1111.1110.2</epc>
                    <epc>urn:epc:id:gid:1111.1110.3</epc>
                    <epc>urn:epc:id:gid:1111.1110.4</epc>
                    <epc>urn:epc:id:gid:1111.1110.5</epc>
                </epcList>
                <action>ADD</action>
                <bizStep></bizStep>
                <disposition></disposition>
                <readPoint>
                    <id>urn:company:warehouse1:taggingStation23</id>
                </readPoint>
                <bizLocation>
                    <id>urn:company:warehouse1</id>
                </bizLocation>
                <bizTransactionList/>
            </ObjectEvent>
            </ns5:EventList>
        </reportEntry>
        <reportEntry>
            <epc>urn:epc:id:gid:1111.1110.1</epc>
            <ns5:EventList xmlns:ns4="http://www.bea.com/ns/rfid/enterprise/epcis-capture/xsd/2.0/" xmlns:ns7="http://www.bea.com/ns/rfid/enterprise/epcis-masterdata/xsd/2.0" xmlns:ns3="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" xmlns:ns5="urn:epcglobal:epcis:xsd:1" xmlns:ns2="urn:epcglobal:epcis-query:xsd:1" xmlns:ns6="urn:epcglobal:epcis-masterdata:xsd:1">
            <AggregationEvent>
                <eventTime>2001-12-18T04:30:47.000-05:00</eventTime>
                <recordTime>2006-09-25T12:33:42.531-04:00</recordTime>
                <parentID>urn:epc:id:gid:1111.1110.5</parentID>
                <childEPCs>
                    <epc>urn:epc:id:gid:1111.1110.2</epc>
                    <epc>urn:epc:id:gid:1111.1110.3</epc>
                    <epc>urn:epc:id:gid:1111.1110.1</epc>
                </childEPCs>
                <action>ADD</action>
                <bizStep></bizStep>
                <disposition></disposition>
                <readPoint>
                    <id>urn:company:warehouse1:dockDoor23</id>
                </readPoint>
                <bizLocation>
                    <id>urn:company:warehouse1</id>
                </bizLocation>
                 <bizTransactionList/>
            </AggregationEvent>
            </ns5:EventList>

        </reportEntry>

    <!--- Other report entries--->

    </epcisReport>