Skip to Content

Net Total that will add up "Total AAA + Total BBB"

Hello Gurus,

I'm using crystal report XI. I'm trying to calculate the value for some groups only, so for example, I have group lay down as follow

CurMon

AAA

A111 432.2

A112 12.1

Total AAA 444.3

BBB

B111 50.5

B112 31.3

Total BBB 81.8

CCC

C111 60.2

C112 21.1

Total CCC 81.3

I have more groups and subgroups like this. Now I want a "Net Total" that will add up "Total AAA + Total BBB" So it should display as follow,right below the "Total BBB"

Net Total : 526.1

I tried with formula like

If Group1 in ['AAA','BBB']

Then

Sum{CurMon}

But it sum for all values.

Can somebody help me as how do I complete this?

Thank in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • May 21 at 03:40 PM

    You could also do this with a running total:

    1. Create a new running total in the Field Explorer.

    2. Give it a name.
    Field to Summarize = {CurMon}
    Evaluate = Use Formula.
    Formula = {Group_Field} in ['AAA', 'BBB']
    Reset = Never

    3. Create a second group footer section and put the new running total in it.

    4. Set the Suppress formula for this new section to (do NOT check the Suppress checkbox!):

    {Group_Field} <> 'BBB'

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

  • May 21 at 07:47 AM

    Hi Dax,

    1. Insert a Group Footer B section

    2. Go to the Section Expert > Highlight Group Footer B > Click the formula button beside "Suppress" and use this code:

    {Group_Field} <> 'BBB' //Replace {Group_Field} with the database field used as the Group

    3. Create a new formula field with this code:

    If {Group_Field} IN ["AAA", "BBB"] Then {CurMon}

    4. Go to the Insert Summary option > Choose this formula field as the "Field to Summarize" > Under "Summary Location" select "Group Footer".

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • May 22 at 02:03 PM

    Thank you Dell and Abhilash for your reply. So I tried your suggestions and it seems I'm still missing something, I'm sorry as I was not clear on my initial question. So let me reword it with more information.

    Group CurVaue

    AAA

    A111 8000.0

    A112 4000.0

    A113 4000.0

    Total AAA 16000.0

    BBB

    B111 2000.0

    B114 1000.0

    B113 2000.0

    B112 4000.0

    Total BBB 9000.0

    Net TOTAL 7.0 (This include the values of AAA & BBB, So the formula should calculate ((AAA-BBB)/1000)

    CCC

    C111 4000.0

    C112 4000.0

    Total CCC 8000.00

    DDD

    D112 5000.0

    D223 3000.0

    D222 1000.0

    Total DDD 9000.0

    EEE

    E111 4000.0

    E222 2000.0

    E333 6000.0

    Total EEE 12000.00

    Total 29.0 (This include values of CCCâ……D&EEE)

    GGG

    G234 6000.0

    G343 5000.0

    I have many other groups like that and wanted to display total of some groups as showed in bold in above example.

    So can you please help as how do I achieve this?

    Again Thank you in advance.

    Add comment
    10|10000 characters needed characters exceeded

  • May 22 at 06:50 PM

    Hello,

    I think i got it the way I wanted those values on my report..

    Now on similar report I wanted to Subtract the values. For example,
    Department CurrMon
    AAA
    A111 2.0
    A112 5.0
    A113 5.0
    TOTAL 12.0
    BBB
    B111 3.0
    B112 2.0
    B113 5.0
    Total 10.0
    Net Count 2.0 --- This count is of (AAA-BBB)

    I tried to use the field summary but there is no any subtraction. So any Idea how do I do this?

    Thanks again...

    Add comment
    10|10000 characters needed characters exceeded