# show a group based on sum of a field ?

i am a total beginner to CR.
I am using Version 9

i have Report similar to this format

Customer NO    Customer      Sales 1   Unit1    Sales2  Unit 2
Product NO       Product            \$56        5          \$34        6

so what this is :
its  a sales comparable , we are comparing how much a customer ordered last year (sale1,uni1) vs this year
i have created a Group based on Customer NO. and its fine
end of each customer group i am reporting the total for "SALE 2" , now what i need is, i dont want to know about a customer if they didnt place an order this year. so if TOTAL of Sales2 is ZERO i dont wana see them. i dont have the option in Product expert to select i assume since its a Summary insert... any idea?

Thanks,
Asked:
###### Who is Participating?

Commented:
How do you calculate the total?

If you are using summary functions then simply use the conditional suppression on the Group header/footer and details

Right click the section in the left margin
Click SECTION EXPERT
Select each section in turn
Click the FORMULA BUTTON to the right of SUPPRESS
Select the summary from the field list
comapre to 0

Youshould see something like

Sum({SalesField},{CustomerField}) = 0

mlmcc
0

Author Commented:
just to explain more, in my Group Footer i display the TOTAL for Sales 2, i want it if that is = ZERO hide the whole group. is it even possible?
0

Commented:
Just keep in mind that when using suppression like that, CR is still reading the records.  It's just not showing them to you.  So, for example, if you're doing a grand total of Sales1, that will include the figures from all of the customers that you suppressed because the total for Sales2 was 0.

I think you can get around that using running totals.  Create a running total on Sales1 (or whatever).  Under Evaluate, select "Use a formula", click on the X+2 (formula) button and enter a formula like:

Sum ({sales2 field), {customer field}) <> 0

I think that will work (I'm not entirely sure about using the Sum function in that formula).  If it doesn't work, you can accumulate your own totals using formulas and variables.  Just ask if you need help.

James
0

Author Commented:
WOW thank you to both of you, running total as well as Suppresion worked like a charm,
just one last thing, i get this report like 2 times a week with all the info (in rpt format), and need to shrink like how you guys showed me, is there any procedure i can write to make it easier? if not its not a big deal.

Thanks again
0

Author Commented:
nvm guys, what i will do is just change the RPT file and feed the program that generates it, i tried it and workd. sweet.
thanks again.
0

Author Commented:
Thanks.
0

Commented:
You're welcome.  Glad I could help.

James
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

## Already a member? Login.

All Courses

From novice to tech pro — start learning today.