Solved

IIF Expression based on Parameter

Posted on 2008-10-29
5
596 Views
Last Modified: 2012-08-13
I need an expression that show a certain field based on a parameter input

--
=iif(Parameters!NetorGross.Value = "Net",Fields!EndbalanceNet.Value,
iif(Parameters!!NetorGross.Value = "Gross",Fields!EndBalanceGross.Value))
--
It keeps on blowing up
thx
0
Comment
Question by:fundsf
  • 2
5 Comments
 
LVL 22

Accepted Solution

by:
PedroCGD earned 250 total points
ID: 22843915
=iif(Parameters!NetorGross.Value = "Net",Fields!EndbalanceNet.Value,
iif(Parameters!!NetorGross.Value = "Gross",Fields!EndBalanceGross.Value,NEEDTHISVALUE))

You need to add a value in NEEDTHISVALUE Fixed it?
Regards
0
 
LVL 38

Assisted Solution

by:Jim P.
Jim P. earned 250 total points
ID: 22844056
Are you saying you want someone to type in "net" or "gross" in a pop-up box?

Try this:
=iif(Trim([Enter Net or Gross])  = "Net",Fields!EndbalanceNet.Value,
,Fields!EndBalanceGross.Value)

Open in new window

0
 

Author Closing Comment

by:fundsf
ID: 31511447
Thx,
I took pieces of both of your answers and it worked.

=iif(Parameters!NetorGross.Value = "Net",Fields!EndbalanceNet.Value,
Fields!EndBalanceGross.Value)
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 22844565
Glad to be of assistance. May all your days get brighter and brighter.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Database - Move Tables from one Database to Another 4 43
SSIS GUID Variable 2 30
Can I skip a node in XML? 9 29
Regarding Disk IO 3 41
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

685 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