Show value instead of "error" in field

  • Thread starter Thread starter MBS
  • Start date Start date
M

MBS

I would like a way to show a number instead of "error" in the case
were there are no values for a calculated field in a report. I.e., if
I am showing a ratio to get a percentage, but the underlying query
results are empty, I would still like to display 100% in the report
field. I would appreciate any help!

Thanks--
 
Use and IIF statement in your query for the field where you are doing the
calc. ie. if you are as you say using a ratio, then you've got a division
issue. So your IIF might look like

AliasField: IIF(IsNull ([NumeratorField],1,IIF(IsNull([denominator]) or
[Denuminator]=0,0,[NumeratorField]/[Denominator]))

HTH
 
I am currently not doing calculations in the query but only in the
report field. I.e., my report field might have a control source of
=Sum(Abs([within30days]))/Count(*). Does this mean I have to rewrite
the reports and queries and do the calc in the queries or is there
another way?

Thanks
 
Back
Top