Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Q: correct iif syntax

Status
Not open for further replies.

KCcasey

Programmer
Sep 30, 2003
69
NZ
Hi,

Complete newbie! I trying to customise the appearance of a couple of reports in MS Reporting Services (sp2) using its capacity to accept VB.NET expressions...

I thought what I wanted to do was ridicously easy, but its not working!

I have a resultset column that is either "EXPORT" or "NZ". Based on that I want to dictate a colour...

I'm using:
=iif((Fields!SalesBranch) is "NZ", "Red", "Orange")

...and only orange is being returned.

Any ideas??

Thanks in advance, Casey.
 
thats great, only thing is that Reporting Services is returning:

"... Operator '=' is not defined for types 'Microsoft.ReportingServices.ReportProcessing.ReportObjectModel.Field' and 'String'. Use 'Is' operator to compare two reference types."

Any other ideas? :)

Kind Regards,

Casey.
 
well, the expression is working fine, thing is its only returning orange.

I've explicitly cast the SalesBranch field as a string, tried surrounding the test criteria in wildcards and still no dice!

I must be missing something obvious...

<sigh>

Regards,

Casey.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top