I don't know how best to explain this but will try.
In my SSRS 2005 report, i have one group in my table. In that group, I have a field that for each company record in my dataset, this field value is repeated for each record. This is a transactions table so you'd expect several records in the dataset for each company..that's not the problem.
example data from dataset:
TransID CompanyID FeeGoal
1 1000 100
2 1000 100
3 1000 100
4 2000 400
5 2000 400
My SSRS 2005 Report has:
Group1 fields:
CompanyID FeeGoal
=Fields!CustomerNumber.Value =Fields!FeeGoal.Value
The output when previewed looks like this:
Company FeeGoal
1000 100
2000 400
Footer 209409730.83 (totals up all feegoals! not just unique instances!)
I have a footer, and this is where the problem comes in. I am not able to sum 100 + 400 because if I do a SUM(=Fields!FeeGoal.Value) It doesn't just sume up 100 + 400 but rather (100 + 100 + 100) + (400 + 400)
I can't find a way to sum up basically the top values for FeeGoal which is really what the Group Field is doing since I get 100 and 400 in my group field for feeGoal. I should end up with a total of 500 for my footer total for Fee Goal but not sure how to get this to work in this unique situation.
FYI: FeeGoal is an input from an ASP.NET form to allow managers to update that one column in my report so that other calculations can rely on it in my group fields. Once the user finishes, I run a stored proc to insert that fee goal in every customer transaction record / feegoal field
I guess is there a way to do some sort of Distinct SUM in an expression? I also tried:
=SUM((Max(Fields!FeeGoal_AZ.Value)) / Fields!FeeSchedule.Value) * 100)
but you can't have an aggregate function like this, I get this error:
[rsAggregateofAggregate] The Value expression for the textbox 'GrossGoal_gt' contains an aggregate function (or RunningValue or RowNumber functions) in the argument to another aggregate function (or RunningValue). Aggregate functions cannot be nested inside other aggregate functions.
Build complete -- 1 errors, 0 warnings