dianemarie
Instructor
Hello, I have an if/then/else expression that returns an integer. It works fine:
exp1: xQtyShipElseBook:
=iif(Fields!QtyShip.Value > 0,Fields!QtyShip.Value,Fields!QtyOrd.Value)
I want to use this expression as a field in another if/then/else expression, again returning an integer. I have copied the second expression, as well as the error. Can anyone see what's wrong? Should I rewrite these two expressions as on block of custom code instead? Thank you for any guidance, or um....code to copy.
exp2: xQtyCurrent (I'm comparing data over a 2 year period)
=iif(Fields!xQtyShipElseBook.Value >= Parameters!CurrentStart.Value
and Fields!xQtyShipElseBook.Value <= Parameters!CurrentEnd.Value,
Fields!xQtyShipElseBook.Value,0)
Error message: (the report runs, but I return nothing in the field for xQtyCurrent - the first expression is not on the report canvas.)
[rsRuntimeErrorInExpression] The Value expression for the field ‘xQtyShipElseBook’ contains an error: Operator '>=' is not defined for type 'Integer' and type 'Date'.
Preview complete -- 0 errors, 1 warnings
exp1: xQtyShipElseBook:
=iif(Fields!QtyShip.Value > 0,Fields!QtyShip.Value,Fields!QtyOrd.Value)
I want to use this expression as a field in another if/then/else expression, again returning an integer. I have copied the second expression, as well as the error. Can anyone see what's wrong? Should I rewrite these two expressions as on block of custom code instead? Thank you for any guidance, or um....code to copy.
exp2: xQtyCurrent (I'm comparing data over a 2 year period)
=iif(Fields!xQtyShipElseBook.Value >= Parameters!CurrentStart.Value
and Fields!xQtyShipElseBook.Value <= Parameters!CurrentEnd.Value,
Fields!xQtyShipElseBook.Value,0)
Error message: (the report runs, but I return nothing in the field for xQtyCurrent - the first expression is not on the report canvas.)
[rsRuntimeErrorInExpression] The Value expression for the field ‘xQtyShipElseBook’ contains an error: Operator '>=' is not defined for type 'Integer' and type 'Date'.
Preview complete -- 0 errors, 1 warnings