Page 1 of 1
					
				Accessing String List Variable
				Posted: Mon Oct 08, 2018 9:29 am
				by robert.andrews
				Hi
I have created a String List variable that users will use to filter the returns of data.  Is there a way I can use this with the SQL Select statement to do some server side limits as opposed to all client side (Currently using the databand filter)?
Is there a way to display the contents of this variable similar to ToQueryString() without the escaping?
Finally, when trying to map the items in the list via Items, it doesnt seem to work for any Data Sources, see below for an example.

 
			 
			
					
				Re: Accessing String List Variable
				Posted: Wed Oct 10, 2018 7:24 am
				by Lech Kulikowski
				Hello,
Please select DataSource property. When select Items it is possible to add only static values.
Thank you.
			 
			
					
				Re: Accessing String List Variable
				Posted: Thu Oct 11, 2018 11:08 am
				by robert.andrews
				Lech Kulikowski wrote: ↑Wed Oct 10, 2018 7:24 am
Hello,
Please select DataSource property. When select Items it is possible to add only static values.
Thank you.
 
Thanks for that!
Is there a way to access the list of items in the variable with a simple CSV style output?
 
			 
			
					
				Re: Accessing String List Variable
				Posted: Fri Oct 12, 2018 2:38 pm
				by Lech Kulikowski
				Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
			 
			
					
				Re: Accessing String List Variable
				Posted: Mon Oct 15, 2018 2:21 pm
				by robert.andrews
				The options that a user may have selected within the List, is there a way to display those on the page as feedback to the user?
Using ToQueryString() on the variable name is close to what I need however it also applies some escaping to the values.
Thanks
			 
			
					
				Re: Accessing String List Variable
				Posted: Wed Oct 17, 2018 12:45 pm
				by Lech Kulikowski
				Hello,
Unfortunately, only ToQueryString() method is available for the List Variables.
Thank you.
			 
			
					
				Re: Accessing String List Variable
				Posted: Thu Mar 14, 2019 5:14 pm
				by ianwelsh
				This may or may not help:
due to how we've integrated this into our software, our "choose one or more" options are passed to the report as a single string variable, with the selected options comma delimited.  The passed options would be ID values.
We then use the following in the WHERE clause:
@map_ids = '' OR CHARINDEX(','+CONVERT(VARCHAR,maps.id)+',',','+@map_ids+',')>0
Variable: map_ids ("Allow using as a SQL parameter" = true, string/value)
Database Table/Index: Maps / ID
Hope that makes sense and helps.
			 
			
					
				Re: Accessing String List Variable
				Posted: Fri Mar 15, 2019 10:53 am
				by HighAley
				Hello.
Thank you for your solution.