cancel
Showing results for 
Search instead for 
Did you mean: 

how to get difference of 2 group header

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Thanks .The solution is working fine