Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 ssrs iif expression

Author  Topic 

jassie
Constraint Violating Yak Guru

332 Posts

Posted - 2014-01-16 : 10:21:09
In an ssrs 2008 r2 report, I need to place a 'customer short name' in a detail line when the field has a value in it. When there is no value in the 'customer short name', I am suppose to use the 'customer long name'.

Thus can you should me how to setup this code in an iif expression?

James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-01-16 : 12:11:49
Like this if the "no value" means it is null.
=IIF(IsNothing(Fields!CustomerShortName.Value), Fields!CustomerLongName.Value,Fields!CustomerShortName.Value)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-17 : 07:08:40
Also this
IIF(Fields!CustomerShortName.Value Is Nothing, Fields!CustomerLongName.Value,Fields!CustomerShortName.Value)

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -