Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Counter variables, anyone?

Status
Not open for further replies.

Catadmin

Programmer
Oct 26, 2001
3,097
0
0
US
I can do this in Crystal. Now I'm trying to figure out how to do counter variables in Reporting Services.

Essentially, everytime the detail row is processed, I want to add 1 to a local variable so that I can get a record count total. Then use that variable in an expression in the group footer to show how many records were in each group. Make sense?

The only information I can find on this is doing RunningValues which add known fields to each other rather than something where I can create a variable and set it to zero on each group, then sum it by itself + 1.

Thoughts appreciated. Thanks,



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
In your base recordset make a dummy field such as:
Code:
SELECT Field1, Field2, Field3, [b]1 CountMe[/b]
FROM Table
Then at the footer of each group, or whatever, you just make it = SUM(CountMe). Would that work?
 
Hmm. It might just at that. Let me play with it and see what I come up with.

Thanks!



Catadmin - MCDBA, MCSA
"If a person is Microsoft Certified, does that mean that Microsoft pays the bills for the funny white jackets that tie in the back???
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top