Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to create If statement in Visual Studio reporting services

Posted on 2010-11-22
4
Medium Priority
?
879 Views
Last Modified: 2012-05-10
I know how to create a basic IF statement in Visual Studio reporting services.  However, I would like to add another conidition to the statement.  For example, I would like to check if a field equals a value AND equals another value.  I have the following statement that I would like to add to:

=IIf(Fields!Company.Value = "value", "Technical Hours", "Technical Sub Hours")

I would like to say if the Company field equals "Value" AND the Acct field equals "Value2" THEN.  Just like that but I do not know the syntax.  Thanks!
0
Comment
Question by:zintech
[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
4 Comments
 
LVL 11

Accepted Solution

by:
MajorBigDeal earned 2000 total points
ID: 34192255
It is tricky to do this in the if statement itself in reporting services.  You would be better off creating a custom function and reference that.
0
 

Author Comment

by:zintech
ID: 34196341
Where would I create the custom function at, in Visual Studio itself?
0
 
LVL 11

Assisted Solution

by:MajorBigDeal
MajorBigDeal earned 2000 total points
ID: 34200310
I think it is under the code tab of the report properties - if that doesn't work for you just let me know.
0
 
LVL 7

Expert Comment

by:mr_nadger
ID: 34239595
sorry, I meant a SQL function and call it from a stored proc used as the reports data source
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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

704 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