Skip to Content
avatar image
Former Member

how to get difference of 2 group header

Hi

I am developing report in crystal report

in that, i have grouped with titlename

titlename1 1000

-----------------------------------------

800

200

titlename2 700

--------------------------------------------

500

200

titlename3 300

---------------------------------------------------

titlename4 400

200

200

I want to get in titlename3(1000-700)=300 from (titilename1-titlename2)

group total 700,300 I got from summary field.Please help me.

Thanks and Regards

Rama

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Aug 21, 2017 at 07:49 AM

    Hi Rama,

    Create a formula with this code and place it on the Group Header:

    shared numbervar t3;
    if GroupNumber < 3 then
        t3 := t3 + Sum({Measure field},{Title Name Field});
    if GroupNumber = 3 then 
    t3
    else
    Sum({Measure field},{Title Name Field});

    Replace {Measure field} with the field to be summed, and {Title Name Field} with the correct field for Title.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 22, 2017 at 08:19 AM

    Thanks .The solution is working fine

    Add comment
    10|10000 characters needed characters exceeded