[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 862
  • Last Modified:

Problem with conditional formatting(SSRS)

=IIF(Fields!taskcode.Value = "2trss", "White",IIF(ISNothing(Fields!actualenddate), "Red", "Green"))

The part of this expression that is not working for me is that the value where Fields!actualeenddate = nothing is not being flagged as red. When I look at the actualenddate on the report it is blank. Any assistance is appreciated.
0
J C
Asked:
J C
1 Solution
 
SThayaCommented:
can you show me the sample data in the column Fields!actualenddate
0
 
SThayaCommented:
can you tell me how the data is available in your data set column "Fields!actualenddate "?


if it came with "NULL" string then this expression will work out. else  need to work on that..

Send me the sample data for isnothing case
0
 
Nico BontenbalCommented:
On this page:
http://msdn.microsoft.com/en-us/library/ms157328.aspx
The expression
=IIF(Fields!PhoneNumber.Value Is Nothing,"No Value",Fields!PhoneNumber.Value)

Open in new window

is used. So maybe you should change your code to:
=IIF(Fields!taskcode.Value = "2trss", "White",IIF(Fields!actualenddate Is Nothing, "Red", "Green"))

Open in new window

0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
ValentinoVBI ConsultantCommented:
The part with "is nothing" is referencing the whole field object instead of the value, not sure if that would work.  Here's an update to the expression by Nicobo:

=IIF(Fields!taskcode.Value = "2trss", "White"
 , IIF(Fields!actualenddate.Value Is Nothing, "Red", "Green"))

Open in new window

0
 
Nico BontenbalCommented:
Good point Valentino. Didn't notice that one. That's probably why the original expression didn't work. Updating it to
=IIF(Fields!taskcode.Value = "2trss", "White",IIF(ISNothing(Fields!actualenddate.Value), "Red", "Green"))

Open in new window

will probably also solve the problem.
0
 
J CAuthor Commented:
That was exactly it!
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now