Developing reports from HDS
When you use hierarchical data sources to create reports, you need to be aware of its limitations and unique features. For example, reports created from an HDS are automatically grouped, and an HDS cannot be directly used to create charts and crosstabs. That is to say, if you want to create a chart or crosstab from an HDS, you will need to put it in a banded object, which is created on the HDS, and make the chart/crosstab inherit the dataset of the banded object.
To develop a report from an HDS:
- Make sure the catalog where the HDS is located is open, then click the New Page Report button on the Standard toolbar.
- In the New Page Report dialog, specify the title and layout of the first report tab in the report as required, then click OK.
- In the Data screen of the report wizard, choose the HDS with which you want to build the report tab.
- Follow the report wizard to create the report tab.
Notes:
- As hierarchical data sources can only be used to create banded objects, in the New Page Report dialog, you can only choose to create a standard banded, horizontal banded or mailing label report using the report wizard.
- Since reports created from HDS are automatically grouped, in the Group screen of the banded wizard, you can neither add more groups by fields nor remove the existing ones. However, you can make changes to the existing group criteria. For example, you can replace a group by field with another one.
- When you want to publish reports created from XML format hierarchical data sources to JReport Server, the following method is recommended:
- In the Catalog Browser, select the HDS that is used by the report from the Hierarchical node, and then expand the Properties sheet.
- Change the URI property of the HDS to a relative path, for example, leaving only the name of the XML file.
- Create a new folder, and copy the report, the catalog, the XML file and the XSD file (if any) to the newly created folder.
- Click File > Publish and Download > Publish to Server to publish the folder (for details, see Publishing resources remotely).
- Start JReport Server. You will now be able to run the report on it.
The following are some specific examples about developing reports from HDS: