Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Return Null 1

Status
Not open for further replies.

CoSpringsGuy

IS-IT--Management
Aug 9, 2007
955
US
Easy question I think....

I want to do a distinct count of a formula field.
//
if isnull({DU_COLL_CREDIT_FOR_LEGAL_N_B.DATE_RETURNED}) = false
then{DU_COLL_CREDIT_FOR_LEGAL_N_B.ACCOUNT_NUM}

Distinct count gives me one more than I want because the formula returns a default. When you use distinct count with a database field that contains null you dont get that extra count because it doesn't count the null field. Is there a way to return null in the else part of the formula so that I don't count that default?

Help me out LB!!!!

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
if not isnull({DU_COLL_CREDIT_FOR_LEGAL_N_B.DATE_RETURNED}) then
{DU_COLL_CREDIT_FOR_LEGAL_N_B.ACCOUNT_NUM} else
tonumber({@null})

...where {@null} is a formula created by opening and saving a new formula without entering anything. If Account_num is a string, remove the tonumber().

-LB
 
perfect!



_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top