I am creating a field from tables with our shoretel phone system and i am intergrating reports via SSRS and i need some assisstance with an expression.
=if(Fields!ExitReason.Value 7,
then if (Fields!ExitReason.Value 1,
else if (Fields!ExitReason.Value 0,)))
Definition results should be:
=if(Fields!ExitReason.Value) = 7 then 1 else 0
I am try to get the field to give me 7, 1 else 0. Any assistance would be great.
Thanks, Arron
The keyword for an If statement in SSRS is IIF. SSRS interprets expressions to set property values and constructs expressions using simple constants, parameters, dataset fields, functions, and operators.
To add an expression to a text box For example, for the dataset field Sales, type [Sales] . For a complex expression, right-click the text box, and select Expression. The Expression dialog box opens. Type or interactively create your expression after the '=' in the expression pane, and then click OK.
The CDate function converts the value to a date. The Now function returns a date value containing the current date and time according to your system. DateDiff returns a Long value specifying the number of time intervals between two Date values.
Functions are almost always used at some point within an expression. A particular function we are going to touch on in this article is called IsNothing. This function will let you inspect the value of an object to find out if it is NULL or not.
You should be able to use
IIF(Fields!ExitReason.Value = 7, 1, 0)
http://msdn.microsoft.com/en-us/library/ms157328.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With