Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Nested IF statement visual studio 2005

Posted on 2013-06-17
2
Medium Priority
?
610 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
2 Comments
 
LVL 53

Accepted Solution

by:
Rgonzo1971 earned 1500 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

886 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