Solved

Nested IF statement visual studio 2005

Posted on 2013-06-17
2
580 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 51

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ejb stateless example 2 68
Using Third Party DLL with Access VBA 14 65
batch file or script 4 66
ASP.NET, Globalization, language indexes, translation, conversion. 2 71
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
Viewers will learn how to maximize accessibility options in an Excel workbook for users with accessibility issues.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

751 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