|
|
Question : MS Reporting Services IIF expression and MS SQL Server Database Money datatype
|
|
Hi All,
The textbox is using the following expression = sum(iif( Fields!Opportunity_Type.Value = "Renewal", Fields!DT.Value, 0.00))
Previously in the database when the column DT is of type FLOAT, this expression was working fine. But after changing it to datatype MONEY it is throwing the following error: The value expression for the textbox textbox51 uses an aggregate function on data of varying data types. Aggregate functions other than First, Last, Previous, Count, and CountDistinct can only aggregate data of a single data type.
I know that I need to convert the value 0.00 to datatype money; a sort of type casting. But how?
I tried making the 0.00 to 0 but didn't work. Even $0 failed
Any little help is also appreciated.
Thanks and Regards, Srinivas
|
Answer : MS Reporting Services IIF expression and MS SQL Server Database Money datatype
|
|
this one just a bit shorter and more native Report Services ;): = sum(iif( Fields!Opportunity_Type.Value = "Renewal", Fields!DT.Value, CDec(0))) Cheers, Yurich
|
|
|
|
|