Click here to Skip to main content
15,884,176 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I want to calculate sum of "total amount" with condition in crystal report, so my database fields are :-
1) billNo
2) tot_amt (data type is "Number")
3)status (data type is "text")

My problem is : when I create summary sum function it will sum all tot_amt value,
but I want sum of tot_amt whose status value is null or blank.

How to create custom sum function which check the "status" fields value and then sum the "tot_amt" field, after all it will shows on "report footer section" ?


thanks in advanced..!

Regards :
Jayanta
Posted

1 solution

SELECT sum(coalesce(sub_ttl,0))
FROM [PROTELMVY].[PRO].[chk_header]
 
Share this answer
 
Comments
JayantaChatterjee 31-Jan-14 8:37am    
I need custom function in Crystal Reports to calculate sum of "total amount" with condition, not the sql query...

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