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

LVL 1
ochnessAsked:
Who is Participating?
 
reb73Commented:
Well, I guess the CountRows() should be fine for your report in its current state..

If you have a dataset declared, try using the dataset as the scope parameter, like -

=RunningValue(Fields!InvtID, Count, "DataSet1")

Where DataSet1 is the dataset containing InvtID..
0
 
reb73Commented:
Try leaving the scope blank..
0
 
reb73Commented:
Or try -

        

=RunningValue(Fields!InvtID, Count, Nothing)
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
ochnessAuthor Commented:
Thanks for the response....I tried that and I get an error that says I have an incorrect number of parameters for the function.
0
 
ochnessAuthor Commented:
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.
0
 
reb73Commented:
Strange, see the link below which suggests using Nothing..

http://msdn.microsoft.com/en-us/library/ms159136(SQL.90).aspx
0
 
ochnessAuthor Commented:
Well I see what they are saying...just doesn't work. HMMM...not sure what to do now.
0
 
ochnessAuthor Commented:
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?
0
 
reb73Commented:
Try using the Expression builder in Report Designer..

http://msdn.microsoft.com/en-us/library/ms157376(SQL.90).aspx
0
 
ochnessAuthor Commented:
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.
0
 
ochnessAuthor Commented:
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.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.