2

I am using report builder and I have created an IIF statement on a calculated field I have created (called Tolerance)

The field of "Tolerance" is returning a difference in time between two other fields in the format of 00:00:00.

My IIF statement is as follows:

=IIF(Fields!Tolerance.Value < = "-00:10:00", "Passed","Failed")

This is running OK in the report but the results are all #Error.

Mureinik
  • 297,002
  • 52
  • 306
  • 350

2 Answers2

1

You have an space between < and =. This space is not allowed, as these are not two different operators, but a single <= operator:

=IIF(Fields!Tolerance.Value <= "-00:10:00", "Passed","Failed")
Mureinik
  • 297,002
  • 52
  • 306
  • 350
0

Is your field Tolerance.Value a number?

Value "-00:10:00" is a string.

Try

=IIF(CSTR(Fields!Tolerance.Value) <= "-00:10:00", "Passed","Failed")

It would be helpful if you would provide samples of your Tolerance.Value values. This solution might only fix the #Error in your resulting report, but not be what you want in case Tolerance.Value should be formatted to similar format with your "-00:10:00" value.

Raybarg
  • 730
  • 6
  • 12