show a group based on sum of a field ?

Posted on 2009-02-13
Last Modified: 2012-05-06
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?

Question by:Raul77

    Author Comment

    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?
    LVL 100

    Accepted Solution

    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
    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

    LVL 34

    Assisted Solution

    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.


    Author Comment

    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

    Author Comment

    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.

    Author Closing Comment

    LVL 34

    Expert Comment

    You're welcome.  Glad I could help.


    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
    Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

    728 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now