Page 1 of 2

Concatenate data

Posted: Wed Dec 30, 2015 1:36 pm
by StixStax
Hi,

i have data on a databand which comes out this way:

Text1: Person A
Text2: Person B
Text3: Person C
...

I would like to concatenate this data and have the output in one text:
Text1: Person A, Person B, Person C

Do you have an idea how I could accomplish this?

Re: Concatenate data

Posted: Wed Dec 30, 2015 3:09 pm
by Jan
Hello,

You can use following expression in text component if PersonA, PersonB and PersonC is a fields of the one data row:

Code: Select all

{Person A} {Person B} {Person C}
Please contact us if you need any additional help.

Thank you.

Re: Concatenate data

Posted: Mon Jan 04, 2016 8:40 am
by StixStax
Hey Jan,

Its the same field in the data structure, where Person comes from.

I added sample data to show what my desired output should look like. I need to concatenate the strings from the same data field as shown in the last cell at the bottom of the page (all countries). Do you have an idea how to get rid of the rest of the cells?

Re: Concatenate data

Posted: Mon Jan 04, 2016 9:30 am
by HighAley
Hello.

If you need to join values from the same column and different records, then you could use next expression:

Code: Select all

{Func.EngineHelper.JoinColumnContent(Countries, "CountryName", ",")}
Thank you.

Re: Concatenate data

Posted: Mon Jan 04, 2016 1:09 pm
by StixStax
Exactly what I needed. Thank you so much. Thank you for your fast reply

Re: Concatenate data

Posted: Tue Jan 05, 2016 9:10 am
by HighAley
Hello.

We are always glad to help you.

Thank you.

Re: Concatenate data

Posted: Mon Mar 14, 2016 12:16 pm
by StixStax
Hi,

do you have an idea how to exclude same strings? I do not have the textfield on a databand.

Re: Concatenate data

Posted: Mon Mar 14, 2016 1:16 pm
by HighAley
Hello.

Please, describe your scenario more detailed.
What do you need to exclude and by what condition.
Could you send us a sample report template with data?

Thank you.

Re: Concatenate data

Posted: Mon Mar 14, 2016 2:03 pm
by StixStax
In the following example "Andorra" is listed multiple times. How can I change the report, so I can only see it once?

Re: Concatenate data

Posted: Mon Mar 14, 2016 2:30 pm
by HighAley
Hello.

You should create a Data Source from other data source with grouping on duplicating column. And then use it in the JoinColumnContent function.

Please, look at the attached report template.

Thank you.