Solved

# show a group based on sum of a field ?

Posted on 2009-02-13
Medium Priority
415 Views
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,
0
Question by:Raul77
• 4
• 2

Author Comment

ID: 23638479
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

LVL 101

Accepted Solution

mlmcc earned 1200 total points
ID: 23638925
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

LVL 35

Assisted Solution

James0628 earned 800 total points
ID: 23639107
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 Comment

ID: 23641592
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 Comment

ID: 23643075
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 Closing Comment

ID: 31546818
Thanks.
0

LVL 35

Expert Comment

ID: 23644494
You're welcome.  Glad I could help.

James
0

## Featured Post

Question has a verified solution.

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

1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
###### Suggested Courses
Course of the Month17 days, 2 hours left to enroll