Skip to Content

if else statement in crystal reports 2016

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 03, 2017 at 11:11 AM

    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

    Add comment
    10|10000 characters needed characters exceeded