Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This sections details how to modify BIRT report designs and registrations to alter the report that the user can generate.

Report Customisation

The first thing we need to look at the the label for the report in the report view.

Report Label

When displaying the an available report to the user Weave will use the Display Name property set in the report design to obtain the text , for its label. For the Blank Report template the text for this property is "Blank Report", so that was the text that was displayed in the report panel in the client.

So To alter the label text we could go back to the report design, change the Display Name property and save the report design, then the next time the client starts the report will have the new label in the report view.

...

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

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:birt="urn:com.cohga.server.report.birt#1.0">

    <birt:report id="sample" report="reports\sample_report" label="Sample Report"/>

</config>

Report Description

If you hold the mouse cursor over the report label in the report view you'll notice a description of the report popup

Again, this can be changed by editing the report design and changing the Description in the report properties

Or alternatively you can set a 'description' property in the report registration.

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

<config xmlns="urn:com.cohga.server.config#1.0" xmlns:birt="urn:com.cohga.server.report.birt#1.0">

    <birt:report id="sample" report="reports\sample_report" label="Sample Report" description="Sample for demonstrating BIRT"/>

</config>

Image Added

Report Parameters

Report parameters allow you to obtain input from the user when it's time to generate the report and that input can be used to alter the generated report.

This can be used simply to include custom text in a report or in more advanced ways by using the scripting environment within the BIRT reporting engine to make major changes to the report.

The report parameters can be seen in the Report Parameters section on the Outline panel in the BIRT report designer.

To create a new report parameter right click on the Report Parameters item and select New Parameter.

From there you can enter the detail for the new report parameter

Image Added

Then you can use the parameter in a report item

Info

A simple way to add a report parameter to a report design and have it display the text is to drag and drop the parameter from the Outline view to the report design

Image Added

Then when the user tries to generate the report they will be asked for the report title

Image Added

which will appear in the generated report

Image Added