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

Display Country's name in Textbox Expand / Collapse
Author
Message
Posted Wednesday, November 6, 2013 2:32 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Monday, June 9, 2014 1:21 AM
Points: 58, Visits: 191
Goal:
Display the name of countries in a list based on selection. For instance, if I select Australia and France, the country's name should display in the textbox. If I select (Select All), all the country's name shall be printed in the textbox.

Problem:
I do not know how to do it. I can retrieve one country but not many countries.



  Post Attachments 
11.png (7 views, 101.65 KB)
Post #1512010
Posted Wednesday, November 6, 2013 5:18 PM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Yesterday @ 5:58 AM
Points: 86, Visits: 760
You can use the Join function in an expression to create a delimited list.

E.g.

=Join(Parameters!Country.Value,",")

Would create a CSV string of the selected countries.
Post #1512038
Posted Thursday, November 14, 2013 9:40 AM


SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, November 18, 2013 4:48 PM
Points: 46, Visits: 113
Get me? (11/6/2013)
You can use the Join function in an expression to create a delimited list.

E.g.

=Join(Parameters!Country.Value,",")

Would create a CSV string of the selected countries.



i agree with this solution. usually i accomplish this kind of thing on the database side using a UDF, but it's the same principal. one thing i must allow for is datatype size. the datatype may be set up to allow for 50 characters (thinking that a single country's character count isn't likely to go above 50 characters) - however, when you are using a deliminated value, you have to think about how many characters ALL the country values will have. if you don't allow for this you will likely get a truncation error.


Dana

"Drats! Foiled again!"
Post #1514359
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse