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!

Null value display in grid 2

Status
Not open for further replies.
Sep 17, 2001
673
US
TextBox's have a property called 'DisplayNull' which allows me to display what I want instead of the sick looking NULL. I could not find such a property for a grid.column, so is there a way to handle this? I want all nulls to appear as 0's. I don't want to query the data with 0's but want to leave the null's as they are for avg() agregate functions.

Regards,

Rob
 
Perhaps you are looking for the .NullDisplay rather than the .DisplayNull property. The grid does not have this property, but the textbox in the grid does.
 
Thanks for the replies. The SET NULLDISPLAY will be an ok work around but I really need control over each columns nulldisplay value as some columns may have 0.00 and some 0. But 0 or blank is better than null.

Regards,

Rob
 
Oooh. I got a star. I think that's a first!

So you never get nulls in character or date columns? They're always in numerics?

I suspect you're thinking inside the box on this. Nulls are MUCH wider problems than just numeric fields.
 
I usually write a UDF to handle the conversion and that way I can control what a NULL looks like. Here is a sample of a character NULL returned as blank:

**************************************
*** NULL Record converted to blank ***
**************************************
PROCEDURE NulltoBlank ()
LPARAMETERS cData
IF ISNULL(cData)
RETURN ""
ELSE
RETURN cData
ENDIF
ENDFUNC

Hope that helps.



Ed
 
What about the NVL() function?
See helpfile on that.
-Bart
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top