4 Replies - 2822 Views - Last Post: 18 February 2013 - 08:41 AM Rate Topic: -----

#1 Thinus du Pisanie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 107
  • Joined: 07-October 11

IIF Statements in vb.net report server

Posted 18 February 2013 - 06:05 AM

Good day

I have a problem I can't solve.I am writing a report and want to ask if it is possible.

The statement or expresion to show data in report is usually like this:

[b]Fields!KPA_Weght_Result.Value[/b]


What I want to do is the text displaying in the report must change to certain text if it shows a certain text.

Now the statement in expression I want to run is:

[b]IIF(Fields!KPA_Weght_Result.Value='Hello')[/b]


Then the text must change to "Hi"

Do you know in any way how to do statement. Because I tried this that works.

=IIF(Fields!KPA_Weght_Result.Value >= 4, "Green")


But this doesn't

=IIF(Fields!KPA_Weght_Result.Value = "Hello", "Hi")


Regards

Is This A Good Question/Topic? 0
  • +

Replies To: IIF Statements in vb.net report server

#2 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3515
  • View blog
  • Posts: 12,002
  • Joined: 12-December 12

Re: IIF Statements in vb.net report server

Posted 18 February 2013 - 06:25 AM

How can the weight-result value be both a number (>= 4) and a word ("Hello")..?
Was This Post Helpful? 0
  • +
  • -

#3 Thinus du Pisanie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 107
  • Joined: 07-October 11

Re: IIF Statements in vb.net report server

Posted 18 February 2013 - 07:12 AM

Don't worry about the column name just the principle want to figure out.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3515
  • View blog
  • Posts: 12,002
  • Joined: 12-December 12

Re: IIF Statements in vb.net report server

Posted 18 February 2013 - 07:26 AM

View PostThinus du Pisanie, on 18 February 2013 - 07:12 AM, said:

Don't worry about the column name just the principle want to figure out.

IIF has three parameters and you shouldn't skip the third one (return value if false).
Was This Post Helpful? 2
  • +
  • -

#5 Thinus du Pisanie  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 107
  • Joined: 07-October 11

Re: IIF Statements in vb.net report server

Posted 18 February 2013 - 08:41 AM

Thanks it works
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1