开发者

ReportViewer question

I have a column that divides a field by another field. And if it is 0 I it prints Error. How can I get it to print nothing or a 0 in this sit开发者_StackOverflow社区uation?


Can you just create an expression for the result column and display the result conditionally?

Eg, instead of:

=ColumnA!Value/ColumnB!Value

Use something like:

=Iff(ColumnB!Value <> 0, ColumnA!Value/ColumnB!Value, 0)


You should try this one:

=IIF(Fields!F1.Value <> 0, Fields!F2.Value / 
   IIF(Fields!F1.Value <> 0, Fields!F1.Value, 42), 0)

Also check this link for more information.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜