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

Report Builder Multi-value parameter textbox expression Expand / Collapse
Author
Message
Posted Tuesday, December 4, 2012 9:00 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, November 4, 2014 9:12 AM
Points: 13, Visits: 90
Hi,

I have a distinct list of state-county parameter and a text box that displays this value if selected.

How do I create an expression that is (Select all) is selected then display 'All' rather than every state-county name being displayed.

=IIf(IsNothing(Parameters!pStateCounty.Value), "All", Parameters!pStateCounty.Value)

this expression is not working since a multivalue parameter cannot be set to null and I get an (error)

Thank you.
Post #1392559
Posted Wednesday, December 5, 2012 9:29 AM
UDP Broadcaster

UDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP BroadcasterUDP Broadcaster

Group: General Forum Members
Last Login: Friday, October 24, 2014 9:55 AM
Points: 1,485, Visits: 1,036
The only thing I think you can do is compare the number of selected items to the total number of items.
iif(Parameters!pStateCounty.Count = Count(Fields!StateCounty.Value, "MyStateCountyDataSetName"),"All", Join(Parameters!pStateCounty.Label, ",")

Edit Spelling
Post #1393080
Posted Wednesday, December 5, 2012 8:47 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, November 4, 2014 9:12 AM
Points: 13, Visits: 90
Thank you for your response. I used your expression with 'countdistinct' and it worked great.

Post #1393308
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse