After the data source definition for the component, the next step is the report configuration.
Here, we will guide you through the process of preparing the report using XML configuration. To define the report you should accomplish the following steps:
<dataSource> block :
<config>
<dataSource type="...">
...
</dataSource>
<defaultSlice>
<axes>
<axis name="rows"> </axis>
<axis name="columns"> </axis>
<axis name="pages"> </axis>
</axes>
<measures> </measures>
</defaultSlice>
</config>
<axis name="rows"> tag
<hierarchy> block(s) with dimension name and hierarchy name, you may add as much fields as you like:<axis name="rows">
<hierarchy>
<dimensionName>[Country]</dimensionName>
<hierarchyName>[Country].[Country]</hierarchyName>
</hierarchy>
<hierarchy>
<dimensionName>[Color]</dimensionName>
<hierarchyName>[Color].[Color]</hierarchyName>
</hierarchy>
</axis>
<axis name="columns"> <hierarchy> block(s) too:<axis name="columns">
<hierarchy>
<dimensionName>[Category]</dimensionName>
<hierarchyName>[Category].[Category]</hierarchyName>
</hierarchy>
</axis>
Define which values you would like to be shown on the report. You can add several values:
<measures>Also, you have to specify where measures should be shown: add measures
<measure>[Measures].[Price]</measure>
<measure>[Measures].[Quantity]</measure>
</measures>
hierarchy block to columns (in example) or rows tag:
<axis name="columns">
<hierarchy>
<dimensionName>[Category]</dimensionName>
<hierarchyName>[Category].[Category]</hierarchyName>
</hierarchy>
<hierarchy>
<dimensionName>[Measures]</dimensionName>
<hierarchyName>[Measures]</hierarchyName>
</hierarchy>
</axis>
<defaultSlice>
<axes>
<axis name="rows">
<hierarchy>
<dimensionName>[Country]</dimensionName>
<hierarchyName>[Country].[Country]</hierarchyName>
</hierarchy>
<hierarchy>
<dimensionName>[Color]</dimensionName>
<hierarchyName>[Color].[Color]</hierarchyName>
</hierarchy>
</axis>
<axis name="columns">
<hierarchy>
<dimensionName>[Category]</dimensionName>
<hierarchyName>[Category].[Category]</hierarchyName>
</hierarchy>
<hierarchy>
<dimensionName>[Measures]</dimensionName>
<hierarchyName>[Measures]</hierarchyName>
</hierarchy>
</axis>
<axis name="pages"> </axis>
</axes>
<measures>
<measure>[Measures].[Price]</measure>
<measure>[Measures].[Quantity]</measure>
</measures>
</defaultSlice>
hierarchy block to <axis name="pages"> tag:<axis name="pages">
<hierarchy>
<dimensionName>[Destination]</dimensionName>
<hierarchyName>[Destination].[Destination]</hierarchyName>
</hierarchy>
</axis>
<measure> tag.
<measure aggregation="Count">[Measures].[Quantity]</measure>
The following aggregation functions are available for CSV data source:
| Function | Summarizes |
|---|---|
| Sum | The sum of the values. This is the default function for numeric data. |
| Count | The number of data values |
| Average | The average of the values |
| Max | The largest value |
| Min | The smallest value |
| Product | The product of the values |
| Percent | Values in percent |
<hierarchy> tag can have additional <filter> block which includes all the members of the field which would be included into report.<axis name="rows">
<hierarchy>
<dimensionName>[Color]</dimensionName>
<hierarchyName>[Color].[Color]</hierarchyName>
<filter>
<member>[Color].[Color].[red]</member>
<member>[Color].[Color].[green]</member>
</filter>
</hierarchy>
</axis>
If you have any troubleshooting with this process, open index.html from your package to see the example of Pivot Table and Charts embedding with sample data. Also see Troubleshooting.