Reputation: 11
Basically, I want to check if the value of field F1 is not empty. If the row not empty then I want to calculate F2 * F3
The following expression always print
#Error
=IIf(Fields!f1 ="" ,"" ,Fields!f2.Value* Fields!If3.Value)
Please help
Upvotes: 1
Views: 2470
Reputation: 1453
Maybe this will help You http://awebthatworks.wordpress.com/2010/04/29/reportviewer-expressions-which-use-data-fields-show-as-error/
Upvotes: 0
Reputation: 21
You must use the Val function.
=IIF(IsNumeric(Fields!f2.Value) and IsNumeric(Fields!If3.Value),
Val(Fields!f2.Value)*Val(Fields!If3.Value),
Nothing
)
ReportViewer
is a pain. IIf always evaluate 2 parts (true and false).
Upvotes: 2
Reputation: 331
Go and check the field expression. if you have something like: sum(fieldName) you must replace it with fieldName
Upvotes: 0