cancel
Showing results for 
Search instead for 
Did you mean: 

if else statement in crystal reports 2016

0 Kudos

Hello All

I have a column as "Source" in that data is

REC,PAY,PAY,REC,REC,REC,PAY like this

now i wanted to divide the data for payments and receipts.i have to write 2 formulas

if source is "rec" then it should display sum of Receipts in report footer based on amount field.

if source is "pay" then it should display sum of Payments in report footer based on same amount field.

can anybody tell me how to write the formula please.

Thanks

Paturi

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Create two formula

@REceipts
If Source = 'Rec' then ReceiptField else 0

Repeat for Payments, you can then sum these formula in either Group or Report Footers
Ian