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

How to make a field to show nothing rather than 0

Status
Not open for further replies.

jack91

Technical User
Apr 13, 2009
185
US
hi

I am using crystal version 10.

I have a field which sometimes have no data. For such results I would rather see the field as a blank rather than see zeroes.

Please advise
Jk
 
In the table you are pulling this info from: is the field allowed to be null or is it set to default to zero?

If it is null in the table I would assume it would be blank in the report (mine normally is unless I script it to default for null values).

You could always make a formula field. Is this field numeric? Do you do any summary calculations?
 
Make a formula:

if {table.field} = 0
then isnull({table.field})
else {table.field}

If your field is a string, use " " around the 0. I think that might work.
 
The field is a MAC address.

I am thinking of right clicking the field. Common tab, suppress and in the x+2 write the following:

{mac address_value}= "0"

u think this would work ?
I am using crystal v 10

thanks
Jk
 
when i use:

if {table.field} = 0
then isnull({table.field})
else {table.field}

the last part {table.field} --> gives an error saying "a Boolean is required here.

Jk
 
It would depend. If you want nulls instead of 0s meaning you would have blank lines in your report, try my suggestion. If you want the 0s to just not show up so the report would look nicer, use your way.
 
If your field really is null, then when you place it on the report, it will not show a zero--unless you have checked "convert nulls to default values" in file->report options.

-LB
 
Lb,

Do you have your own CR consulting service or signature like ken hamady does?

Regards,
Jk
 
Go to File -> Report Options -> Uncheck 'Convert Database NULL values to default'
This should solve your problem of getting 0's when the field is left blank
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top