Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Display Country's name in Textbox


Display Country's name in Textbox

Author
Message
akirajt
akirajt
Valued Member
Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)Valued Member (58 reputation)

Group: General Forum Members
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.
Attachments
11.png (7 views, 101.00 KB)
Spiff
Spiff
SSC Veteran
SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)SSC Veteran (294 reputation)

Group: General Forum Members
Points: 294 Visits: 2224
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.
danawexler
danawexler
SSC Rookie
SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)SSC Rookie (46 reputation)

Group: General Forum Members
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!"
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search