Configure the First Report

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:

  1. Open config.xml for editing.
  2. Insert blank XML template for default slice after <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>

  3. Add rows data: insert into <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>
  4. Add columns data: insert into tag <axis name="columns"> <hierarchy> block(s) too:
    <axis name="columns">
      <hierarchy>
        <dimensionName>[Category]</dimensionName>
        <hierarchyName>[Category].[Category]</hierarchyName>
      </hierarchy>

    </axis>
  5. Define which values you would like to be shown on the report. You can add several values:

    <measures>
      <measure>[Measures].[Price]</measure>
      <measure>[Measures].[Quantity]</measure>

    </measures>
    Also, you have to specify where measures should be shown: add 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>
  6. Your default slice should look like this:
    <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>

  7. Refresh your page with Pivot Table and Charts Component - you will see grid with data.

Optional:

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.