Error CS0019: Operator '/' cannot be applied...
Hi! I'm a new user to FAST Reports (experienced Crystal Reports user), and I'm trying to create a Parameter to place in the Data band on a report. It is called $/MH. It is set as a Decimal DataType. The expression I'm trying to get to work is:
[Total_Labor]/IIf([BOQ_Table.HOURS] ==0, 1, [BOQ_Table.HOURS])
[Total_Labor] is another Parameter, DataType = Decimal. Total_Labor is a formula of 2 datafields that are each Decimal datatypes. [BOQ_Table.HOURS] is a datafield, DataType = Decimal. I've tried all manners of trying to get this expression to work and it keeps returning the Error Msg:
$/MH: Error CS0019: Operator '/' cannot be applied to operands of type 'decimal'and 'object'.
I had already created 4 other parameters using the same syntax that are working but they are on Group Footer bands. They are all Variant datatypes. The syntax of them is:
[G3 LaborTotal]/IIf([G3 HoursTotal]==0, 1,[G3 HoursTotal])
[G3 LaborTotal] is a Total of a data field BOQ_URB1 which is Labor$. It is a Decimal DataType.
[G3 HoursTotal} is a Total of a data field BOQ_HOURS which is Labor HOURS. It too, is a Decimal DataType.
Why is one of these Parameter expressions not working but 4 others with the same syntax working?
Thanks,
Mike
[Total_Labor]/IIf([BOQ_Table.HOURS] ==0, 1, [BOQ_Table.HOURS])
[Total_Labor] is another Parameter, DataType = Decimal. Total_Labor is a formula of 2 datafields that are each Decimal datatypes. [BOQ_Table.HOURS] is a datafield, DataType = Decimal. I've tried all manners of trying to get this expression to work and it keeps returning the Error Msg:
$/MH: Error CS0019: Operator '/' cannot be applied to operands of type 'decimal'and 'object'.
I had already created 4 other parameters using the same syntax that are working but they are on Group Footer bands. They are all Variant datatypes. The syntax of them is:
[G3 LaborTotal]/IIf([G3 HoursTotal]==0, 1,[G3 HoursTotal])
[G3 LaborTotal] is a Total of a data field BOQ_URB1 which is Labor$. It is a Decimal DataType.
[G3 HoursTotal} is a Total of a data field BOQ_HOURS which is Labor HOURS. It too, is a Decimal DataType.
Why is one of these Parameter expressions not working but 4 others with the same syntax working?
Thanks,
Mike