Previous Topic

Book Contents

Book Index

Next Topic

BIRT Report Based on XML from Valuemation

To define a BIRT report for a particular object type (e.g. Ticket), the report designer needs to know the attribute structure of this object type. For authorization reasons, the BIRT report designer does not connect directly to the database but receives data from Valuemation in the form of an XML file.

Thus BIRT report creation consists of the following steps:

  1. Create a suitable XML file
  2. Use this file to create a report definition in the BIRT Report Designer.
  3. Import the report definition (based on the exported XML) back to Valuemation

Here is how it is done:

Create a suitable XML file

To create an XML file which can be used for BIRT report definition:

  1. Open a catalog of the object type for which the report is to be created
  2. Call the export function (right click -> Export) on one of the objects in the catalog.

    Note: Which object to use is not completely arbitrary, the following consideration must be made.

    The exported structure may contain both plain and referenced attributes. If it contains also referenced attributes, then the object on which the export function is called has to be selected with care. Namely, you must select an object which has assigned at least one referenced object whose attribute is selected for the XML export.

    For example, if you want to create a report based on the 'Ticket' object type and containing plain attributes 'Ticket No.', 'Ticket shorttext' and 'Priority' plus referenced attributes 'Ticket class' and 'Ticket class ID', then you have to make sure that the ticket object on which you call the export function has a ticket class assigned. If you select a ticket with no ticket class association, referenced attributes belonging to ticket class will not be contained in the XML attribute structure, and consequently will be missing in the BIRT report definition.

  3. Clicking 'Export' opens the Exporter window. Now you need to create our own export filter reflecting desired attribute structure of the future report (i.e. which object type attributes will be displayed in the report).
    • Click the 'Create' button
    • Make sure that the 'Save filter' check box is checked
    • In the attribute tree, check all the attributes to be displayed in the resulting BIRT report
    • When defining export filter, make sure that related objects have selected all identification fields (they are marked with a pink ball in the exporter tree)
  4. Export the XML by specifying a file name and clicking 'Export'. Because 'Save filter' is checked, you are also asked to specify a name for the attribute filter. This export filter gets saved in the database and will be used later on when importing the report definition.

Create a report definition in the BIRT Report Designer

Use the exported XML file to define a new report definition in the BIRT report designer. Once the report definition has been created, it needs to be imported into Valuemation.

On each report, translations can be used. They are defined by the key and the file they're saved in. In order to successfully apply translations:

Get the 'properties' file from Valuemation

  • find your property file (e.g. '...\vmcache\xxxx\translations\crystalreports\CrystalReportsLabelsText_en_US.properties')
  • copy the file to your desired location
  • rename it to CrystalReportsLabelsText.properties (this has to be done in order to enable localized reports)
  • Add the property file to BIRT Resources and refresh your BIRT report project

Add the Resource to your Report

  • select your Report in the Navigator (the bottom-left corner of the GUI by default)
  • left-click on any space on the Report Layout
  • in the Property Editor - Report tab select Resources
  • in the 'Properties Files' click the 'Add File...' button
  • select your Shared Resource
  • add the file CrystalReportsLabelsText.properties

Localize a Text field

  • drag & drop the Label report item from the Palette to the Report Layout
  • in the Property Editor - Label select Localization
  • Browse for a Text key
  • select your desired Translation

Import the report definition

To import the report definition:

  1. Go to the 'Customize' menu and select 'BIRT Report Definitions'. The 'BIRT Report Definitions' window gets opened.
  2. In the window, click the 'New' button to create a new report entry.
  3. Select the newly created report (a line in the 'BIRT Report Definitions' list) and click the '...' button next to the 'Filename' attribute at the bottom of the 'BIRT Report Definitions' window. Select a BIRT Report Design (.rptdesign) file and click 'Open', then click the 'Import' button to import the report definition into the newly created report.
  4. Next it is necessary to specify:
    • Valuemation object type to which the report belongs (e.g. 'Ticket', to continue the example above) - do this in the 'Object Type' column of the list
    • Export Filter - in the 'Export Filter' column, select the Valuemation export filter that was used for export of the XML file on which the now imported BIRT report definition is based. This is particularly important as it tells Valuemation what data it is supposed to send to the BIRT server when individual reports based on this report definition are created.

The above described steps ensure successful BIRT report design integration.

Note: To learn more about BIRT reports creation, please follow this external link.

See Also

BIRT Reporting

Installation and Configuration

Integration of Birt Customizing

Multiple Resource Files in BIRT

Problems & Solutions

Predefined Reports in Valuemation

BIRT with SOAP Webservice