Siebel Reports Administration Guide > Reports with Group Sections >

Adding Group Totals to Reports


Group totals can appear beneath one or more numeric report columns, at the end of each group section. They provide subtotals within each group for monetary and quantity fields. A grand total of these fields can appear at the end of the report.

Group total data controls are configured in the child After frame of the group section. A group total control sums the values of a datastream variable in all the report rows in the group. To accomplish this, the Sum function is used. The scope of a Sum function within the After frame of a group section is limited to the records in that group. For additional information on the Sum function, see the information on frames and controls in Developing Advanced e.Reports.

This example uses the report created in Example—Creating a Report with a Group Break. A group total control is added to the After section of the ssGroupStage group section. It enables totaling of the revenue values for each group.

To add revenue totals to the group section

  1. Click the Library Browser button, and in the Choose Included Module dialog box, select sscustom.rol.
  2. Drag and drop the ssFrm component from the Library Browser window onto the group section's child After section. Subclass the frame following the instructions from in Creating a Report Design in Actuate e.Report Designer Professional and rename it ssFrmGroupTotals.
  3. Enlarge the frame vertically in the layout pane to about twice its original height.
  4. Drag and drop the ssCur component from the Library Browser window onto the ssFrmGroupTotals frame. Specify the following as the ValueExp:

    Sum(Val([ssRevenue]))

    NOTE:  The above expression works only in ENU locale. To make it locale compliant tcCurrency control must be used.

  5. Rename the new ssCur component curGroupRevenueTot. Reposition it in the layout frame so that it is aligned with the revenue column of the report.
  6. Drag and drop the LineControl component from the Library Browser window onto the ssFrmGroupTotals frame and rename it LineTotal, then reposition it vertically in the layout pane so that it is above the revenue total control and narrow the line (using the left handle) so that it occupies only the space above the total control.
  7. Save the report design, recompile, and test.

To add a final total to the report

  1. Drag and drop the ssFrm component from the Library Browser window onto the child After slot of the report section (ssReportOpportunity), then subclass it following the instructions in Creating a Report Design in Actuate e.Report Designer Professional and rename it ssFrmReportTotals.
  2. Enlarge the frame vertically in the layout pane to about twice its original height.
  3. Drag and drop the ssCur component from the Library Browser window onto the ssFrmReportTotals frame and specify the following as the ValueExp:

    Sum(Val([ssRevenue]))

    NOTE:  The above expression works only in ENU locale. To make it locale compliant tcCurrency control must be used.

  4. Rename the new ssCur component curReportRevenueTot, then reposition it in the layout frame so that it is aligned with the revenue column of the report.
  5. Drag and drop the LineControl component from the Library Browser window onto the ssFrmReportTotals frame and rename it LineRptTotal, then reposition it vertically in the layout pane so that it is above the revenue total control and narrow the line (using the left handle) so that it occupies only the space above the total control.
  6. Drag and drop the ssLblb component from the Library Browser window onto the ssFrmReportTotals frame and rename it lblRptTotal.
  7. Reposition it to the immediate left of the revenue total control and set its Text property to Grand Total.
  8. Save the report design, recompile, and test.

    NOTE:  An ssCur component assumes that all amounts are in local currency, as set in the Regional Settings in the Windows Control Panel. See How to Display Revenue Information in Siebel Reports for more information.

Siebel Reports Administration Guide