Link to home
Start Free TrialLog in
Avatar of ochness
ochness

asked on

Running Total in SQL Reporting Services

I am trying to add a running total to a textbox in SQL reporting services and i'm getting the following error:
[rsInvalidAggregateScope] The Value expression for the textbox textbox11 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.

I have attached the code for the textbox. I do not have any groups other than Header, Footer, and Detail, so I'm not sure what to use as the second arguement in the RunningValue function.

Any help would be great....Thanks.
=RunningValue(Fields!InvtID, Count, "Table1_Details_Group")

Open in new window

Avatar of reb73
reb73
Flag of Ireland image

Try leaving the scope blank..
Or try -

        

=RunningValue(Fields!InvtID, Count, Nothing)
Avatar of ochness
ochness

ASKER

Thanks for the response....I tried that and I get an error that says I have an incorrect number of parameters for the function.
Avatar of ochness

ASKER

Tried that as well and I get the same error as the original posting. Thanks for your suggestions...anything more?

This is a text box that is all by it's self under the detail line.
Strange, see the link below which suggests using Nothing..

http://msdn.microsoft.com/en-us/library/ms159136(SQL.90).aspx
Avatar of ochness

ASKER

Well I see what they are saying...just doesn't work. HMMM...not sure what to do now.
Avatar of ochness

ASKER

Well this works: =CountRows()

But I'm not sure if that is the best thing to use. I guess it is fine since each Inventory ID (item) is on it's own row.

Any thoughts?
Try using the Expression builder in Report Designer..

http://msdn.microsoft.com/en-us/library/ms157376(SQL.90).aspx
Avatar of ochness

ASKER

I have been using the Expression Editor and I get no red lines when I use =RunningValue(Fields!InvtID, Count, Nothing) so I'm not sure what is going on.
ASKER CERTIFIED SOLUTION
Avatar of reb73
reb73
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ochness

ASKER

This works...Thanks. I tried to use the dataset name, but I didn't use the quotes, so I added the quotes and it works. Thanks for your help with this.