Concat 3 columns in one string

Stimulsoft Reports.NET discussion
Post Reply
rafael.custodio
Posts: 31
Joined: Thu May 30, 2019 1:01 pm

Concat 3 columns in one string

Post by rafael.custodio »

Hi,

I have a table where the data goes:

Table: ClaseBr

ClaseId
197
198
199
200
201
203

ClaseName
1º ANO C|Manhã
2º ANO A|Tarde
3º ANO D|Manhã
4º ANO B|Manhã
EFI5AM
EFll6AM

ClaseImported
true
true
true
true
false
false

I need to concat that information in one string like this:
197|1º ANO C|Manhã|True,198|2º ANO A|Tarde|True, .... and so on.

I can't have it as an output running on a databand.
I tried to use something like the code below, but I can't add more than one column in the same string:
Func.EngineHelper.JoinColumnContent(ClaseBr,"ClaseId",",")


Is there a way to do it?
Lech Kulikowski
Posts: 6198
Joined: Tue Mar 20, 2018 5:34 am

Re: Concat 3 columns in one string

Post by Lech Kulikowski »

Hello,

You can an additional variable, and concat all values in the events or in additional databand.

Thank you.
Attachments
Report1.mrt
(791.23 KiB) Downloaded 93 times
rafael.custodio
Posts: 31
Joined: Thu May 30, 2019 1:01 pm

Re: Concat 3 columns in one string

Post by rafael.custodio »

Hi @Lech Kulikowski, thank you for replying.

Like I said I can't have that running in a databand because I need to process the strings post-concat.

Capturar01.JPG
Capturar01.JPG (80.16 KiB) Viewed 612 times


Could you please give me examples of how to do it with an additional variable in the events?
rafael.custodio
Posts: 31
Joined: Thu May 30, 2019 1:01 pm

Re: Concat 3 columns in one string

Post by rafael.custodio »

Hi guys! Any answer is going to be greatly appreciated.
Kirill Klimenkov

Re: Concat 3 columns in one string

Post by Kirill Klimenkov »

Hello.

Please, check the attached report template.
Note that in will work only in the Compilation mode.

Thank you.
Attachments
getDataFromDS.mrt
(5.93 KiB) Downloaded 94 times
Post Reply