String List values display in designer

Stimulsoft Ultimate discussion
Post Reply
Stevechin83
Posts: 2
Joined: Wed Feb 12, 2020 3:14 am

String List values display in designer

Post 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.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: String List values display in designer

Post 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.
otcm
Posts: 8
Joined: Tue Feb 11, 2020 6:48 am

Re: String List values display in designer

Post 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
Attachments
Test_list.mrt
(39.48 KiB) Downloaded 125 times
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: String List values display in designer

Post by Lech Kulikowski »

Hello,

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

Thank you.
otcm
Posts: 8
Joined: Tue Feb 11, 2020 6:48 am

Re: String List values display in designer

Post 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
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: String List values display in designer

Post by Lech Kulikowski »

Hello,

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

Thank you.
otcm
Posts: 8
Joined: Tue Feb 11, 2020 6:48 am

Re: String List values display in designer

Post 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.
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: String List values display in designer

Post by Lech Kulikowski »

Hello,

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

Thank you.
otcm
Posts: 8
Joined: Tue Feb 11, 2020 6:48 am

Re: String List values display in designer

Post by otcm »

Thanks for the response
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: String List values display in designer

Post by Lech Kulikowski »

Hello

You are welcome.
Post Reply