Click here to Skip to main content
15,886,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SQL
if{DataTable1.Amount_Debit}=0 then "NO Amount is credited yet"
else
sum{DataTable1.Amount_Debit}
Posted
Updated 16-Jan-13 11:00am
v3
Comments
Christian Graus 16-Jan-13 16:56pm    
Do you know what the word 'subject' means ? It means less than 50 chars, summing up your issues. Like 'conditional message in crystal reports'. then tag it as a Crystal Reports question as well as C#, and finally explain where your code comes from, if it runs, what it does, etc. Then you'll have a question that should get answered
zeshanazam 16-Jan-13 16:59pm    
i m making formula field. no value in Amount debit field..but "No Amount is credited yet" not displaying...

1 solution

OK - 0 and no value are not the same thing. I suspect Amount_Debit is null and not 0. This code is not C#, I don't know what it is, but I suggest changing your data source to return 0 instead of null, or change the check to also check if it's null.
 
Share this answer
 
Comments
zeshanazam 16-Jan-13 17:09pm    
i checked it for null too, but error in formula occured "A number,Currency,boolean,datetime or string is expected here

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