Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Running Total in SQL Reporting Services

Posted on 2009-04-01
11
Medium Priority
?
1,016 Views
Last Modified: 2012-06-22
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

0
Comment
Question by:ochness
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 25

Expert Comment

by:reb73
ID: 24041684
Try leaving the scope blank..
0
 
LVL 25

Expert Comment

by:reb73
ID: 24041687
Or try -

        

=RunningValue(Fields!InvtID, Count, Nothing)
0
 
LVL 1

Author Comment

by:ochness
ID: 24041703
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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 
LVL 1

Author Comment

by:ochness
ID: 24041720
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
 
LVL 25

Expert Comment

by:reb73
ID: 24041846
Strange, see the link below which suggests using Nothing..

http://msdn.microsoft.com/en-us/library/ms159136(SQL.90).aspx
0
 
LVL 1

Author Comment

by:ochness
ID: 24041943
Well I see what they are saying...just doesn't work. HMMM...not sure what to do now.
0
 
LVL 1

Author Comment

by:ochness
ID: 24042040
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
 
LVL 25

Expert Comment

by:reb73
ID: 24042042
Try using the Expression builder in Report Designer..

http://msdn.microsoft.com/en-us/library/ms157376(SQL.90).aspx
0
 
LVL 1

Author Comment

by:ochness
ID: 24042083
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
 
LVL 25

Accepted Solution

by:
reb73 earned 500 total points
ID: 24042155
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
 
LVL 1

Author Closing Comment

by:ochness
ID: 31565434
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

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question