Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.
Hi,I am using report viewer and trying to set background color dynamically.I am trying following this writer.WriteElementString("BackgroundColor", "=iif(Fields!" + fieldList[i].ToString() + ".Value'<' 5, \"Red\", \"Green\")"); but its giving error like The BackgroundColor expression for the textbox Txt0 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'. Please reply ASAP. Its very Urgent.
August 25th, 2009 9:46am

Hi Saarika, The issue should be caused by the combined string. "=IIF(Fields!" + fieldList[i].ToString() + ".Value'&lt;' 5, \"Red\", \"Green\")" Lets assume the fieldList[i].ToString() return the value filed1, and then the expression will be in the report: =IIF(Fields!field1.Value'<' 5, "Red", "Green") Please remove the single quote around the &lt;: writer.WriteElementString("BackgroundColor", "=iif(Fields!" + fieldList[i].ToString() + ".Value&lt; 5, \"Red\", \"Green\")"); If you have any more questions, please feel free to ask. Thanks, Jin ChenJin Chen - MSFT
Free Windows Admin Tool Kit Click here and download it now
August 26th, 2009 11:14am

I am having the same error This is what i have =IIF(Fields!Ticket_Age.Value > 7, "Red") My error is --The Value expression for the textrun 'Ticket_Age.Paragraphs{0}.TextRuns{0}' contains an error: {BC30455} Argument not specified for parameter "FalsePart' of 'Public FunctionIIF[Expression As Boolean,
December 20th, 2011 4:19pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics