Binding data on ReportViewer

笑着哭i 提交于 2019-12-11 17:47:18

问题


I am developing a Report using ReportViewer with ASP.NET and C#. I'm binding data from a DataSource to a Tablix object using the .RDLC design view.

Inside this Tablix, there's a field that must me filled with one field from de datasource OR another one depending of an expression.

The expression in the field I am trying to use to achieve that is:

=IIf(IsNothing(Fields!PREMIO_CALCULADO_1.Value), Fields!PREMIO_CALCULADO_1.Value,Fields!RECUPERACAO_CALCULADA_INI_1.Value)

If the Field "PREMIO_CALCULADO_1" is null, then fill it with "RECUPERACAO_CALCULADA_INI". I'm not having compilation errors but when I execute the report where this value should be there is an #error tag.

Am I doing something wrong with that expression?

Thank you very much.


回答1:


It looks like you have the return values in the wrong position.

Just add a NOT before IsNothing.



来源:https://stackoverflow.com/questions/5104285/binding-data-on-reportviewer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!