I have report in .rdlc format. I have inserted table in my report which is filled in programatically(in runtime) from datatable(which is also filled by dataadapter programatically). Also I want in table to use conditional formatting – background color of cell based on value. To do that in BackGroundColor property of needed column expression was inserted:
=iif(cdbl(Fields!MyField.Value),"Green","Yellow")
I haven’t mentioned that all fields in my datatable are string. Therefore i use cdbl function to convert string to double. And when I render report, i don’t have the desired result.
Therefore questions:
- How to make sure there is no parsing error?
- Is it possible to see step by step computation (as in excel)?
- And what else error could be?
I suspect problem might be in culture.
The quickest way to test is to call
=iif(cdbl("3.14"),"Green","Yellow")=iif(cdbl("3,14"),"Green","Yellow")And see if it’s working.
I don’t have a reporting services right now and can’t test it. I think you can do a tryParse in Reporting services.