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.
[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")
Try leaving the scope blank..
Or try -
=RunningValue(Fields!InvtI D, Count, Nothing)
=RunningValue(Fields!InvtI
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.
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.
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
http://msdn.microsoft.com/en-us/library/ms159136(SQL.90).aspx
ASKER
Well I see what they are saying...just doesn't work. HMMM...not sure what to do now.
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?
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
http://msdn.microsoft.com/en-us/library/ms157376(SQL.90).aspx
ASKER
I have been using the Expression Editor and I get no red lines when I use =RunningValue(Fields!InvtI D, Count, Nothing) so I'm not sure what is going on.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.