Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

substract the group sum value

Status
Not open for further replies.

rv1604

Programmer
May 21, 2012
1
AP
Hi all,

i'm new to crstal report and using CR11 .

in my report i have to 2 group header
GH1 - based on the date
GH2- based on the report type name

i have records below

date report name status number amount

1/1/2012 subscription approved 10 1000
1/1/2012 subscription rejected 2 2
1/1/2012 redemption xyz 2 200
1/1/2012 redemption abc 1 200

am showing in the report as below
(GH1) --(suppress)
(GH2)1/1/2012 subscription

(D)approved 10 1000
(D)rejected 2 2

(GF2) grant total 12 1002

(GH2)1/1/2012 redemption

(D)xyz 2 200
(D)abc 1 200

(GF2) grant total 3 400

GF1 - i want to substract the GF2(subscription).sum(number) - GF2(redemption).(number)

result like 12 - 3 = 9

thanks in advance
 
Create conditional formulas like this:

//{@sub}:
if {table.reportname}="subscription" then
{table.amount}

//{@red}:
if {table.reportname}="redemption" then
{table.amount}

Create a formula like the following for the group #1 footer:

sum({@sub},{table.date})-sum({@red},{table.date})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top