O'Reilly logo

SQL Server 2012 Reporting Services Blueprints by Mickey Stuewe, Marlon Ribunal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding subtotals for each group

Sometimes we need to show the subtotal of each group. Let's create subtotals for each group in our report:

  1. Let's create two new cells on our group header:

    Add the following expression on the cell just right above Qty:

    =Sum(Fields!Qty.Value)
    

    Add the following expression on the next cell to the right (Line Total):

    =Sum(Fields!LineTotal.Value)
    
  2. Set the Text Box Properties of both cells according to their types: Number for Qty and Currency for the Line Total. You can accomplish this by right-clicking on each cell then select Text Box Properties (Number).
  3. Let's also select the three other cells: Date, Sales Order ID, and Unit Price, and right-click on it, then select Merge Cells. Add the following expression:
    ="Subtotal ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required