Report printing zeros question

twistedsistem

Registered User.
Local time
Today, 13:21
Joined
Mar 8, 2007
Messages
10
I have a report that is bringing in fields from a query and in the query the fields are blank but then the report is printing in the zeros. Does anyone know how to make it so that report just does not print anything in that spot instead of zeros?
 
Sounds like you have set a default value for the field to 0, or is formatted as a number?
What about when you run the query behind the report - do you get the same problem? If so, why don't you change the offending field so that it replaces 0's with blanks - the problem with this could be if you are performing some kind of calculation on this field, as this would change field to a string rather than a number
 
When I run the query by itself i do not get the zeros. I am running calculations on these fields. But like i said when i run the query i do not see the zeros. any ideas on how i can fix this?
 
if the query isn't showing 0's then it must be the report. Definitely sounds as if you have a default value for the field, or some kind of input mask on it?.
 
my code does not show an input mask on the report fields. Now in the query i am using the nz code i do not know if that will make a difference on solving this problem will it?
 
Yes!! The NZ function replaces a null value with whatever you specify. therefore if you have nz([field],0) you will be replacing blanks with 0s
 
ok but i need that to be in my query so is there no way to take them out on the report?
 
In the controlsource of the text box you want to not show the zeros, put:

Code:
=IIf(IsNull([YourFieldNameHere] OR [YourFieldNameHere]=0,"",[YourFieldNameHere])
 

Users who are viewing this thread

Back
Top Bottom