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

SSRS 2008: IsNothing Expression when displaying different fields Expand / Collapse
Author
Message
Posted Thursday, December 06, 2012 2:08 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 12:08 AM
Points: 54, Visits: 185
Hi All,

I'd like to display different fields/columns in a graph based on a parameter.
If the parameter is Null I need to display this field: Fields!vchParentIncidentType.Value and if its not null i need to diaplay this field:Fields!vchIncidentType.Value
I'm using the expression below but at the moment its just displaying this field: vchIncidentType.Value - even if there's no value supplied for the parameter(NULL)

=IIF(ISNothing(Parameters!uidIncidentTypeId.Value), Fields!vchParentIncidentType.Value, Fields!vchIncidentType.Value)

Please help with the correct expression to use.

Kind Regards
Teee
Post #1393378
Posted Thursday, December 06, 2012 7:42 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, April 10, 2014 10:18 AM
Points: 1,769, Visits: 2,800
Hi,
Multi-valued parameters can't be NULL as far as I know, no value supplied gives a parameter value of blank rather than NULL.
Try this expression:

=iif(Join(Parameters!uidIncidentTypeId.Value) = "", Fields!vchParentIncidentType.Value, Fields!vchIncidentType.Value)

Cheers
Gaz
Post #1393528
Posted Thursday, December 06, 2012 11:08 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, April 16, 2014 12:08 AM
Points: 54, Visits: 185
It works perfectly! Thank you so much.
Post #1393863
Posted Friday, December 07, 2012 2:55 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Thursday, April 10, 2014 10:18 AM
Points: 1,769, Visits: 2,800
No problem!
Post #1393953
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse