Monday, February 13, 2012
Argument Not Specified For parameter 'TruePart' of Public Function
of 'Public Function IIf(Expression as Boolean, TruePart as Object, FalsePart
as Object) as Object' from the following textbox expression in reporting
services 2005?
=IIF(Sum(Fields!ElapsedRunSeconds.Value)is Nothing, 0,
Sum(Fields!ElapsedRunSeconds.Value)/60.0/60.0)Stacey,
Try =IIF(Sum(Fields!ElapsedRunSeconds.Value) is Nothing, 0, Sum(Fields!
ElapsedRunSeconds.Value)/3600.0)
Inserting a space between "Sum(Fields!ElapsedRunSeconds.Value)" and
"is" or changing is to = should fix it.
Changing the /60.0/60.0 to /3600.0 is mostly for looks and
simplicity. HTH
toolman
stacey wrote:
> why am I getting the error "Argument Not Specified For parameter 'TruePart'
> of 'Public Function IIf(Expression as Boolean, TruePart as Object, FalsePart
> as Object) as Object' from the following textbox expression in reporting
> services 2005?
> =IIF(Sum(Fields!ElapsedRunSeconds.Value)is Nothing, 0,
> Sum(Fields!ElapsedRunSeconds.Value)/60.0/60.0)
Aren't IIF statements supposed to be straight forward...
Hi
IIF statements are simple and I have had them work on other reports. But for the first time I'm using "Like" operator for string comparison and I can't get this to work!
For ease, my boolean condition is in blue color, and the green color field value is to be returned incase the condition is TRUE and the red color field value is to be returned incase the condition is FALSE.
=IIF(((First(Fields!well_type.Value, "WellAttributes")Like First(Fields!code.Value, "LookUpCodeTblAttributes"))And (First(Fields!code_type.Value, "LookUpCodeTblAttributes")Like "well type")),First(Fields!description.Value, "LookUpCodeTblAttributes"),"N/A")
Instead, its giving me the following error:
[rsCompilerErrorInExpression] The Value expression for the textbox ‘well_type’ contains an error: [BC30455] Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.
Build complete -- 1 errors, 2 warnings
If anyone has encountered a similar problem or an idea to resolve this. Please let me know - appreciate it.
Thanks
preps.
I used StrComp operator instead.
Syntax and usage for Like operator can be found at http://msdn2.microsoft.com/en-us/library/swf8kaxw.aspx
Cheers
preps