Modifying the grouping in a document

Our second document has data but it's not ready for prime time yet. There are metrics but no attributes in it. So, let's go on and add some.

Getting ready

You need to have completed the previous recipe to continue.

How to do it...

We start from where we left the previous document:

  1. Click on the Design icon in the toolbar to return to design mode.
  2. In the Dataset Objects pane, click on the Product Subcategory attribute, drag it into the Detail section, and position it just below the Total textbox.
  3. Click on the Interactive Mode icon to run the document.
  4. Much better, we see the description of each subcategory and the corresponding amount; note that the Total is still showing 29M.
  5. Click on Design and go back to design mode. This time, we add the category but instead of dragging it onto the layout we create a group. Right-click on the Category attribute and from the context menu select Add to Grouping.
  6. The Product Category is added to the GROUPING pane above the layout and there are now two more sections: Product Category Header and Product Category Footer.
  7. Pick the Product Category attribute and drag it onto the Product Category Header, dropping it close to the left border.
  8. Now run the document in interactive mode and see the result. We have a paging control at the top of the document where we can select the Product Category, and most important, the Total is different. Can you tell why?
  9. Click on the Product Category paging combobox and select Clothing, the document is updated and the Total changes, do the same for Accessories, what do you expect?
  10. One last time select (All) from the combobox to see the entire dataset in one single view.
  11. Save the document as it is, overwrite the existing one, and click on Run newly saved document.

How it works...

The grouping pane works like the page-by in reports, but with an added feature. You have more sections in the document where you can put attributes and/or metrics; always remember that depending on their location the metrics are aggregated and grouped at different levels, hence displaying different totals.

There's more...

You can add as many groupings as you want, each attribute on the Grouping pane will add its own <Attribute Name> Header/Footer sections to the layout. The nesting of groups is driven by the position; right-most attributes are nested inside left-most attributes.

Exercise 25

Where should we put the metric now in order to have a grand 29M total?

Note

You can watch a screencast of this operation at:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset