Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tasks : Designing Custom Reports

Designing Custom Reports
TIBCO Business Studio allows you to create your own custom reports with the Eclipse Business Intelligence and Reporting Tools (BIRT). BIRT is an open source, Eclipse-based reporting system that allows you to produce HTML and PDF reports. The reports displayed in the Compare Simulation Results View are examples of BIRT reports provided by TIBCO.
BIRT is provided with TIBCO Business Studio, and you can use it to design and run your report. For more information refer to the Eclipse BIRT documentation. When you design your report, make sure to use .sim files as a data source (.sim files are XML files that contain the results of simulation comparison in TIBCO Business Studio).
This section describes how to create a new BIRT report for use in the Compare Simulation Results editor. This report is a simple table. To create the report follow the steps in this section:
For more information about the different types of reports that you can create, refer to the Eclipse BIRT documentation.
Obtain a Data Source
To create a new BIRT report, you will need a sample XML data source file. Even though it has the same file extension, this is not the same as the .sim result files. You can obtain a sample data source using either of the following methods:
In the Compare Simulation Results view, generate a BIRT report with one of the built-in reports. This generates a data file current workspace\.metadata\.plugins\com.tibco.xpd.simulation.compare\.temp\results.sim.
Alternatively, locate the file Studio\3.3\studio-addins\eclipse\plugins\com.tibco.xpd.simulation.compare_version.jar. Open it in WinZip and extract the file sample.sim.
Create a New Report
After you have obtained a sample data source file, create the report as follows.
1.
2.
In the New wizard expand Business Intelligence and Reporting Tools, select Report, and click Next.
3.
Enter a file name for the report using the .rptdesign file extension, then click Finish to start with a blank report.
4.
Create the Data Source
To access data for a BIRT report, you must use a BIRT data source. A BIRT data source is an object that contains connection parameters.
Before creating a data source or multiple sources for your first reports, consider the issues of project and resource organization. If you plan to reuse a data source in multiple report projects, you can create that data source in a library and reuse that data source from the library. The advantage of this approach is that updates to the BIRT data source in the library are subsequently available to all reports that use the library.
Use the Data Explorer, as described in this section, to create and manage BIRT data sources. BIRT Report Designer supports using multiple data sources for the report design. The data sources can be of different types. For example, you can use data from an RDBMS database and data from a flat file repository in the same report design. In this example, the data is extracted from the sample XML data source file.
1.
In the Data Explorer view, right-click Data Sources and select New Data Source.
2.
Select XML Data Source, enter a name for the data source, and click Next.
3.
a.
Click Browse (to the right of the upper text entry field).
b.
In the Open dialog, change the Files of type filter from *.xml to *.*.
c.
4.
In the XML Data Source File field, enter params["sourcexml"] and click OK.
The parameter (params["sourcexml"]) is passed to the report at runtime.
Create the Data Set
A data set identifies the data to retrieve from the data source.
1.
In the Data Explorer view, right-click Data Sets and select New Data Set.
2.
3.
In the Sample XML Settings dialog, click Next to accept the default settings.
4.
On the Row Mapping dialog, select Participant, and click the central arrow button to set the XPath expression. Accept the default XPath expression in the resulting dialog and click OK:
5.
The Row Mapping dialog should look like this:
6.
Click Next.
7.
In the Column Mapping dialog, select the participant Name, AverageIdle, and AverageBusy, accepting the default column mapping for each. The dialog should look like this:
8.
Click Finish.
The Edit Data Set dialog is displayed, allowing you to further define the data set. Click OK to accept the default values.
Create the Report Parameters
Create a parameter to point to the sample XML data source file for the report.
1.
In the Data Explorer view, right-click Report Parameters and select New Parameter.
2.
Give the parameter the name sourcexml then click OK.
Create a Table to Display the Data
In this task, create a table to display the data from the data set that you created previously. You start by inserting a table element, then you insert data elements in the table.
1.
In the Report Design perspective, select Window > Show View > Palette.
2.
From the Palette, drag a table element onto the report. Click OK in the following dialog to create a three column table:
3.
Return to the Data Explorer (select Window > Show View > Data Explorer).
4.
5.
Similarly drag AverageIdle and AverageBusyTime to the detail rows of the second and third columns. The header rows are filled in automatically and the table looks like this:
Import the Report
1.
Select Window > Preferences, and then select Simulation > Report Management.
2.
Click Import.
You can also import a simulation comparison report by selecting the File > Import > Business Process Management > Simulation Comparison report menu.
3.
Give the report a name, use the Browse Workspace button to locate the report file, and click OK.
4.
5.
Select the report, select some simulation results files (.sim files), and click the Display Report button in the Compare Simulation Results view. For example:
6.
The report can be edited, and the new data set is available to use in charts and tables that are added to the report. The actual results file is substituted in and used for the data set when the report is run. For more information about changing the report, refer to the BIRT documentation.
Editing the Report
With the report added to your workspace and available in the Compare Simulation Results view, you can customize the report to suit your needs. To customize the report, do the following:
1.
2.
3.
Click the Display Report button in the Compare Simulation Results view to see the effect of your changes on a report generated from real data.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved