Page 1 of 1

Join column related to other data

Posted: Thu Apr 21, 2016 2:48 pm
by StixStax
Hey,

I'm trying to create a table where order dates are connected to a company name. I need to group those dates and have them in one line separated by ",".

Current Output:
Company name 1 ---- Order date 1
Company name 1 ---- Order date 2
Company name 1 ---- Order date 3
Company name 2 ---- Order date 1
...

Desired Output:
Company name 1 ----- Order date 1, order date 2, order date 3
Company name 2 ---- Order date 1
....

I created a sample file to show the current output.
I already tried "Func.EngineHelper.JoinColumnContent" for order dates but this will show all order dates for every company name on a databand.
Do you have any idea how to solve the issue?

Re: Join column related to other data

Posted: Fri Apr 22, 2016 11:29 am
by Alex K.
Hello,

For the XML datasource, you can use the additional code in BeforePrint event of DataBand in which join necessary values.
For the sql datasource, you can use the JoinColumnContent() function and ReconnectOnEachRow option for the datasource.

Thank you.

Re: Join column related to other data

Posted: Fri Apr 22, 2016 11:51 am
by HighAley
Hello.

Here is a sample report template.
We use a variable to store the data in Before Print event of the Data Band.
ConcatColumnInGroup.mrt
(16.72 KiB) Downloaded 529 times
Thank you.

Re: Join column related to other data

Posted: Fri Apr 22, 2016 12:32 pm
by StixStax
Thank you guys. Exactly what I needed. Excellent as always

Re: Join column related to other data

Posted: Fri Apr 22, 2016 12:47 pm
by Alex K.
Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.

Re: Join column related to other data

Posted: Fri Nov 01, 2019 2:32 pm
by haleb
I am trying to do just this within the Dynamic Report Designer UI. Could you tell me how this would be done within the UI? We need to tie an asset id to a work order id and then have the data populate based off the work order id.

Re: Join column related to other data

Posted: Mon Nov 04, 2019 10:16 pm
by Lech Kulikowski
Hello,

Please send us a sample report with test data with a detailed description for analysis.

Thank you.

Re: Join column related to other data

Posted: Thu Dec 08, 2022 11:55 pm
by MarceloOD
HighAley wrote: Fri Apr 22, 2016 11:51 am Hello.

Here is a sample report template.
We use a variable to store the data in Before Print event of the Data Band.
ConcatColumnInGroup.mrt
Thank you.
Hi, do you know why the variable is locked? I cannot see the code.
Capture.PNG
Capture.PNG (150.52 KiB) Viewed 1460 times

Re: Join column related to other data

Posted: Fri Dec 09, 2022 7:28 am
by Lech Kulikowski
Hello,

The issue was in one of old builds 2015.x and was fixed. But variables created in this build need change. You can manually edit mrt file in notepad or use the following code:

Code: Select all

foreach (StiVariable variable in report.Dictionary.Variables)
 {
variable.Inherited = false;
 }
Thank you.