Solved

Nested IF statement visual studio 2005

Posted on 2013-06-17
2
592 Views
Last Modified: 2013-06-18
In the properties on a table column I need the column to print if I have a specific department.

If the department is "parts","service",or "special" I don't want it to print.

Something like

=IIF(Fields!DEPT_NAME.Value = "Parts",true,IIF (Fields!DEPT_NAME.Value = "service",true,(
 IIF Fields!DEPT_NAME.Value = "Special",true,false))

If I get the syntax correct (no red line) then I get some kind of error when I execute.

The expression is in a table column under the visibility property.
0
Comment
Question by:meagain0707
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 52

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39255401
Hi,

maybe

: IIf([Fields]![DEPT_NAME].[Value]="Parts",True,IIf([Fields]![DEPT_NAME].[Value]="service",True,IIf([Fields]![DEPT_NAME].[Value]="Special",True,False)))
EDIT

IIf(([Fields]![DEPT_NAME].[Value]="Parts" Or [Fields]![DEPT_NAME].[Value]="service" Or [Fields]![DEPT_NAME].[Value]="Special");True;False)

Regards
0
 

Author Closing Comment

by:meagain0707
ID: 39257589
The syntax was different, it work with this:

=IIf((Fields!DEPT_NAME.Value="Service" Or Fields!DEPT_NAME.Value="Deli" OR
 Fields!DEPT_NAME.Value="Special"
 OR Fields!DEPT_NAME.Value="Parts"
  OR Fields!DEPT_NAME.Value="power"
  OR Fields!DEPT_NAME.Value="holidays"),True,False)

Thanks
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Six Sigma Control Plans
Suggested Courses

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question