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

x
?
Solved

Summarizing Running Totals

Posted on 2011-02-25
2
Medium Priority
?
473 Views
Last Modified: 2012-06-22
I am writing a report for my client that has a grouping by Site and a grouping by Internal Program. I then have a running total that resets on the change of grouping Internal Program which counts the distinct member id values and displays them as a total for each group. Obviously, the running total field cannot just be summed up using a summary field. Here is some sample data and what the client expects:

Program 1     50
Program 2     48
Program 3     52
Program 4     50
Site total        200

However, if I insert another running total that resets on site and get a distinct count of the member id values for the entire site grouping, I might wind up with 145 instead of 200.  The client wants 200, not 145.

How do I accomplish this?  I am assuming I would use variables, but have never tackled that before.  Any example code would be greatly appreciated.  Thanks!
0
Comment
Question by:ROTRTechTeam
[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
2 Comments
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 34982268
I can't see your client's logic in wanting such a total , because it would have no meaning, but I accept that's what you are working with.

I don't see any way of using the Running total fields because they are calculated far to late to include them in other formulas.

You need to use Insert Summary in the Program group and create a Distinct Count on the Employeeid field.
Iin the Program group footer you can then create a formula field which adds the summary to a number variable for the Site total.
Then when you reach the Site group footer you will have the Site total and can print it from another formula field.
The Site total variable  needs to be declared and set to 0 in the Site group header in a formula field.

The formula fields need to use WhilePrintingRecords as the first statement.
0
 

Author Closing Comment

by:ROTRTechTeam
ID: 34982426
Thanks! That works!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

721 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