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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

what we use for NULL in crysatl rep 2

Status
Not open for further replies.

davi123

Programmer
Joined
Jul 10, 2003
Messages
46
Location
US
what we use for NULL in crysatl reports.

In my table the column c1 is number and one record has a value NULL for this column.

I will check if c1 value is NULL then use font color black, in changing highlight option.

what's the syntax for null in crystal reports.
 
hi

heres the formula

@Null

if
isnull({your_field})
then
Red
else
not isnull({your_field})
then
blue
 
You cannot format a null field --since it isn't there. If you want to highlight the space to emphasize the null field, then you need to insert the field into a text box and then you can format that to a different color by going to format text->border->background->x+2 and entering:

if isnull({table.field}) then cryellow else crwhite

If you just want to change the font of OTHER fields based on this null value, then you can use the above formula in the font formula section, changing the color to black.

-LB
 
Be sure to test for Null before testing for anything else. Otherwise Crystal will stop when it finds a Null, i.e. if isnull(a) then "Null" else if a = 1 then "one" else "other" would work, but if a = 1 then "one" else if isnull(a) then "Null" else "other" would return nothing.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top