Page 1 of 1

String List values display in designer

Posted: Wed Feb 12, 2020 3:24 am
by Stevechin83
Hi, I have a problem in designer, I have a variable which is string list that able user to filter data with the element they selected in the list.
The problem is that the report need to show the values of the user selected for filtering. I have use {UNN.ToQueryString()} to display the string list but it only shows the key of the string list and I need the value to be display because the key is a long id but the values of it is the name. I can't make the key and values to be the same as the id is important in the database.

Re: String List values display in designer

Posted: Thu Feb 13, 2020 9:51 pm
by Lech Kulikowski
Hello,

ToQueryString method return only key values.
Please send us a sample report with test data, we will try to find a solution for you.

Thank you.

Re: String List values display in designer

Posted: Sun Mar 05, 2023 11:56 pm
by otcm
Hi Support,

I'm facing the same issue - the list.ToQueryString() only returns the key of the List, not the value. How to display the List value in report field?
I have attached the sample report.
I have defined a "List" parameter, and I want to display the List value(not the key) in the report field so user knows what was selected.


Thanks,
J

Re: String List values display in designer

Posted: Tue Mar 07, 2023 8:37 am
by Lech Kulikowski
Hello,

In that case, you should set the Key value the same as the Name in your variable.

Thank you.

Re: String List values display in designer

Posted: Wed Mar 08, 2023 1:14 am
by otcm
Lech Kulikowski wrote: Tue Mar 07, 2023 8:37 am Hello,

In that case, you should set the Key value the same as the Name in your variable.

Thank you.
Thanks for the reply, usually the key is a code in DB, and the value is user friendly name, in case of the key is different then the value, there's no way to display the value?

Thanks,
J

Re: String List values display in designer

Posted: Wed Mar 08, 2023 10:10 pm
by Lech Kulikowski
Hello,

Unfortunately, the ToQueryString() method is show only Keys.

Thank you.

Re: String List values display in designer

Posted: Thu Mar 09, 2023 1:19 am
by otcm
Lech Kulikowski wrote: Wed Mar 08, 2023 10:10 pm Hello,

Unfortunately, the ToQueryString() method is show only Keys.

Thank you.
Is there any other method to show the values? We want the values.

Re: String List values display in designer

Posted: Thu Mar 09, 2023 9:59 pm
by Lech Kulikowski
Hello,

From the variable, no. You can use the JoinColumnContent function for data source:
{Func.EngineHelper.JoinColumnContent(datasource, "columnname", ",")}

Thank you.

Re: String List values display in designer

Posted: Fri Mar 10, 2023 6:47 am
by otcm
Thanks for the response

Re: String List values display in designer

Posted: Sun Mar 12, 2023 8:43 pm
by Lech Kulikowski
Hello

You are welcome.