Example 1: Developing a report from an HDS with dynamic XML URI
The example explains how to develop a report from an HDS with dynamic XML URI:
- Click File > Catalog Management > Open Catalog to open an existing catalog.
- In the Data tab of the Catalog Browser, expand the data source to which to add the HDS.
- Right-click the Parameters node and select Add Parameter from the shortcut menu.
- In the Create Parameter dialog, enter a name for the parameter, choose String as the Value Type, and in the Prompt Values box, type in the URI of the XML file from which you HDS will be imported (for details, see Creating a parameter).
- Right-click the Hierarchical node in the Catalog Brower, and then select Import XML Hierarchical Data Source.
- In the Import XML Hierarchical Data Source dialog, browse for the XML file. Then in the XML URI box, type in @ParameterName. For example, if you named the parameter in step 2 as XML_URI, here you should type in @XML_URI. In the XSD URI box, specify the URI of the corresponding XSD file. Then click OK (for details, see Importing the XML format HDS to a catalog).
- Create a report with the imported HDS. When you view the report, type in the URI of the XML file which matches the XSD file in the parameter. The report will then display the corresponding data.
In addition, you can also use another way to develop report with dynamic XML URI as explained below:
- In the Catalog Browser, import an XML HDS with an XSD file, and then create a report with the imported HDS.
- Create a parameter using the above method.
- In the Catalog Browser, go to the node of the imported HDS, expand the Properties sheet, and then change the property URI to @ParameterName.
- Now you can view the report with dynamic XML file.