Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

IIf statement!? Expand / Collapse
Author
Message
Posted Monday, September 10, 2012 7:52 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668
Hi people.

I need to customize a textbox on my report:
if the field value = 'True' then write 'Allowed'

How do I write this IIf statement?

Thanks
Regards
Post #1356744
Posted Tuesday, September 11, 2012 3:31 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, January 7, 2014 2:21 PM
Points: 132, Visits: 557
You can try following :

1)Go to properties section of the textbox by selecting the textbox and pressing F4.
2) Go to the Format section in properties.
3) Click the drop down near the Format section and select Expression.
4) Type the following expression in the expression window:

=iif(value = 'True', "Allowed", "Not Allowed")

Here 'value' is the textbox value at runtime.


BI Developer
SSRS, SSIS, SSAS, IBM Cognos, IBM Infosphere Cubing services, Crystal reports, IBM DB2, SQL Server, T-SQL
Please visit... ApplyBI
Post #1357235
Posted Tuesday, September 11, 2012 3:40 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Thanks. Works perfectly!
Regards
Post #1357240
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse