0

Salam...
I have SQl Database...And i am using visual basic 2010 i have a problem with Null values.When in my database data have some null values then data not showing in my crystal report ...crystal report showing blank..I want '0' when data is null..for example
my table name is (meetings with organization) and field name (Nature of meeting) which has 3 types
1 meetings
2 school visit
when in these types have no meetings data not showing in crystal report.please help me ...how to show '-'/'0' in crystal report when data have null values,please send me code..and sorry for my english i am not expert in english.soryy for my english mistakes.

Regards
Junior Developer

3
Contributors
4
Replies
20
Views
3 Years
Discussion Span
Last Post by Reverend Jim
0

beacause i call the table directly ..in database expert and then use new connection ..i use formula editor ..but i dont understand how to use my formula on my feild.
i also have Date Range formula..when i right isnull formula in record expert then errors generate like boolean error??

Can u understand Roman English?
junior Developer

0

You could use the COALESCE function. Given two or more parameters, it evaluates to the first parameter that is not null.

SELECT fieldName = COALESCE(fieldName,0) FROM myTable
SELECT fieldName = COALESCE(fieldName,'0') FROM myTable

will replace all null values with 0 or '0' in the returned data depending on whether the field is numeric or string.

Edited by Reverend Jim

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.