开发者

ReportViewer question

开发者 https://www.devze.com 2022-12-19 09:35 出处:网络
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 expre

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

精彩评论

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