Customize reports

To create a custom template based on a default report template:

  1. Open the BIRT Designer application or the Report Design perspective in Eclipse.
  2. Select File > Open file to import the report template and referenced files.
  3. Modify the default datasource:
    1. Select the imported library.
    2. In the Data Explorer table, double-click on defaultDatasource and modify the connection parameters to the InterPlay you want to test on (driver name, URL, user and password).
    3. If the connection is successful, save the modified library.
  4. Modify the template
  5. New BIRT components can be added from the Palette: Text, Dynamic Text, List, Charts, Aggregations an so on.
  6. The datasets can be altered by customizing the SQL. The most common change is to add a configured SQL
  7. For more information about how to create BIRT report templates, refer to BIRT user documentation or BIRT online documentation.
  8. Save the modifications.
  9. Click the Preview tab in the report editor to see the report.
  10. Click the XML Source tab in the report editor and remove the <property> and <encrypted-property> lines which appear inside the <oda-data-source> tag of the <data-sources> tag
  11. Example:

<data-sources>

<oda-data-source extensionID="org.eclipse.birt.report.data.oda.jdbc" name="defaultDataSource" id="15"

extends="defaultDataSource.defaultDataSource">

...

<property name="odaDriverClass">com.mysql.jdbc.Driver</property>

<property name="odaURL">jdbc:mysql://localhost/IP_D</property>

<property name="odaUser">root</property>

<encrypted-property name="odaPassword" encryptionID="base64">YWRtaW4=</encrypted-property>

</oda-data-source>

</data-sources>

Note   The last step is an answer to a known issue in BIRT Designer. See: https://bugs.eclipse.org/bugs/show_bug.cgi?id=343527

The template and referenced files (libraries, styles, images) modified in BIRT Designer, must be imported in the Repository database, according to the predefined structure.

They can be used to generate reports without any other change needed. The report is executed on the InterPlay database. The references are changed dynamically with the dictionaries, images and CSS files that are imported in the Repository database.

Related Links