Grouping and Adding Group-based Summary Columns


Example 1: Ranking, Percent of Totals, Running Totals, and Running Counts

(Run Example)  (View Source)

This example demonstrates how to:

Note that for each break group you add, a group level is added. If you group your report by Product, for example, then level 1 is the overall report level and each product group is at level 2.

 

Example 2: Accessing Group Total Values from Group Headers

(Run Example)  (View Source)

This example demonstrates how to provide group-level summary information in the group headers such as ranking and count by using the <value/> substitution variable in group headers to produce a report as follows:

  1. Ranking information is added to each level 2 group header to identify the location that made the most sales. The calculation of ranking is set to level 1 so the group total value for the calculated member "Rank" will be available in the group header.
  2. Add a product count to indicate the number of products carried in each location for each week. This is done by calculating a "pCount" member using the runningCount calculation function and later set the data in that column to blank using the TextBlox's data tag:

    <bloxreport:text>
       <bloxreport:data
          columnName="pCount"
          text=" " />
    </bloxreport:text>

    Note that you cannot use MembersBlox to remove or OrderBlox to hide this pCount member since either approach will cause the pCount's values to be not available.