Visual Studio Report Filtered Sum

I have a table in a Visual Studio 2008 Report (2005 .rdlc).

The table has a group, each group has a total and after all groups it has a grand total and looks something like this:

Group 1 |     A    |  B  |  C  |
        |     Bob  | 123 |  10 |   
        |     Tim  |  10 |   2 |  
        |  (Steve) | (43)|  (1)|  
Total                133

Group 2 |     A    |  B  |  C  |
        |     Jon  | 100 |  10 |   
        |     Kit  |  30 |   2 |  
        |  (Steve) | (83)|  (1)|  
Total                130

Grand Total          263

Steve is special and his numbers are shown but I don't want them included in any of the totals.

At the moment the Grand Total is an expression


Is there anyway that I can filter out the sum? I have tried creating another group on the table which filters out rows where column A is equal to Steve, but when I try to sum I get an error:

sum(Fields!B.Value, "noSteveGroup")

Error 2 The Value expression for the textbox ‘textbox6’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a data set.


There's no need for extra field. Just convert zero to type of your other field. Like this;

sum(iif(Fields!A.Value = "Steve", CDec(0), Fields!B.Value))

Need Your Help

FindNext returns file names even when used with faDirectory only

delphi file find delphi-xe

I am trying to list all the directories in a given directory. I have this code: