Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 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.

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.

Alternatively we can set the label directly in the report registration in the config file

<?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.

<?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>

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

Then you can use the parameter in a report item

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

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

which will appear in the generated report

  • No labels