Click here to Skip to main content
15,900,511 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, friends.

I've three formula fields in crystal reports as follows:
sumAccrued
sumDeducted
sumPaid

and I have a column called "Amount" in the table "Transactions"

if the cell content = 'Accrued' then sumAccrued
if the cell content = 'Deducted' then sumDeducted
if the cell content = 'Paid' then sumPaid

I've done these codes in the formula fields:

if {Table1.Type} = 'Accrued' then SUM({Table1.Amount})
if {Table1.Type} = 'Deducted' then SUM({Table1.Amount})
if {Table1.Type} = 'Paid' then SUM({Table1.Amount})

but it shows 0.00 in the report viewer!!

what is the error?
Posted

1 solution

A conditional total sample should help you - Conditional Total using an If-Then-Else formula[^].

You can also evaluate using a formula - How to implement conditional sum in CR?[^].
 
Share this answer
 
Comments
Ma'd Saeed 2-Feb-16 13:19pm    
Thank you, brother.
It' has been solved :)

Thank you very much.
Member 13146844 23-May-23 11:42am    
Please can you give me the solve in this problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900