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!

Totalling Field Used in Group Selection Formula

Status
Not open for further replies.

MrTBC

Technical User
Nov 19, 2003
610
0
0
US
Crystal 8.5 Progress Database


I am using a group selection formula so that only certain groups are shown (those where their total value billed is greater than £1,000).
However, I want to have a grandtotal of the same field that I am using for this - which means that the total is incorrect as it is seems to be included the groups that the group selection criteria is blocking out).

Is there any way round this please?

Many Thanks.
 
You could put a similar formula to your group formula in the field you are trying to get a total for so it only gets a total for those you are filtering.
 
Thanks very much - that worked perfectly.
 
That did work and I now have the correct value for each group using a formula 'Value' - however I can't total this field, either by right clicking it or by created a Sum(@value) formaula - I get a 'The Running Total/Summary Field Could not be Created Error Message.'

Many Thanks.
 
You should be able to use a Running Total.

Create a Running total and in the Summary section add your field and use a type of Sum on your field, in the Evaluation section, click the “Use a formula”, and enter in the x-2 button the opposite of your suppression formula (total less than or equal to £1,000). Note for group totals set the Reset value to “On change of group, for Grand Totals Reset value should be never.
 
Thanks sdebo2! I think that's done it.
 
Just a comment. If you aren't using suppression, but instead are using group selection, you can use a running total without having to exclude records in the evaluation section. With a suppression approach, you DO have to enter the opposite of your suppression formula in the evaluation section.

-LB
 
Hello lbass - this confused me actually because I am using Group Selection - but it appears that this IS suppressing records, i.e. I can see the groups that 'fail' the group selection criteria in Drill Down window to the left when in the Preview tab.

I try to avoid using suppression if possible because of these kind of problems.
 
Yes, you would see the records that are not group selected in the group tree. However, those records are non-selected, not suppressed. I think of group selection as a "lifting out" of the base group of records. Running totals behave differently with group selection versus suppression--with suppression you need to use the opposite of the suppression criteria in the evaluation section, but with group selection, the running total calculates only those records that are "lifted out"--as if they are floating atop them (my visualization of the process).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top