JoinColumnContent with calculated columns

Stimulsoft Reports.WPF discussion
Post Reply
maxlock
Posts: 5
Joined: Tue Jul 17, 2018 12:34 pm

JoinColumnContent with calculated columns

Post by maxlock »

Hi,
it seems that using the JoinColumnContent-function with a calculated column, that refers to a property of a referenced item, doesn't work.

I have the following structure:

The class GuestEvent has a property Person, that is also a class. This class has a property DisplayName. I want to join the DisplayName of the referenced persons of the list of GuestEvent-Items, but this doens't work:
{Func.EngineHelper.JoinColumnContent(GuestEvent, "Person.DisplayName", ", ")}

Then I tried to create a calculated column on the GuestEvent-class that refers to the Person.DisplayName-property. This works in a data band but not in the JoinColumnContent-function:
{Func.EngineHelper.JoinColumnContent(GuestEvent, "DisplayName", ", ")}
This produces an empty result.

How can I achieve this?

I am using Stimulsoft 2018.2.1.

Thanks,
Max
Attachments
Designer with calculated column
Designer with calculated column
Stimulsoft request.PNG (50.43 KiB) Viewed 4267 times
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: JoinColumnContent with calculated columns

Post by Lech Kulikowski »

Hello,

Unfortunately, JoinColumnContent is not working via relation.

As a way, you can add an additional band, on which prepare joining Person for each GuestEvent in variable and then show that variable in the necessary Text component.

Thank you.
maxlock
Posts: 5
Joined: Tue Jul 17, 2018 12:34 pm

Re: JoinColumnContent with calculated columns

Post by maxlock »

Hi,
thank you.

Perhaps you can help me achieve the following goal.
I have the attached data model. I have an event that has a list of persons connected through a relation (GuestEvent). Each person has a list of characteristics connected also through a relation.
I want to create a table with two columns. In the first column I have the name of the person (and some fields of the GuestEvent-relation, so I started to create a data band with the list of GuestEvents) and in the second column i want to have a list of characteristics of this person.

So I need to create for each GuestEvent item a string that contains all related characteristics of the connected person.

Thank you
Attachments
Stimulsoft ERM.PNG
Stimulsoft ERM.PNG (10.31 KiB) Viewed 4223 times
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: JoinColumnContent with calculated columns

Post by Lech Kulikowski »

Hello,

Could you send us a simple test data, we will try to find a solution for you.

Thank you.
maxlock
Posts: 5
Joined: Tue Jul 17, 2018 12:34 pm

Re: JoinColumnContent with calculated columns

Post by maxlock »

Hi,
I have prepared a simple example report and a picture of what I try to get as report.

Thanks
Attachments
Stimulsoft_Sample.xml
Sample data
(1.19 KiB) Downloaded 256 times
Stimulsoft Sample Report.pdf
Report output as PDF
(67.98 KiB) Downloaded 306 times
Stimulsoft Sample Report.mrt
Report saved from designer
(9.11 KiB) Downloaded 290 times
The result I want to achieve
The result I want to achieve
Stimulsoft Sample Report Expected.png (19.68 KiB) Viewed 4154 times
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: JoinColumnContent with calculated columns

Post by Lech Kulikowski »

Hello,

Please check the sample report in the attachment.

Thank you.
Attachments
Stimulsoft Sample Report_modified.mrt
(13.67 KiB) Downloaded 348 times
maxlock
Posts: 5
Joined: Tue Jul 17, 2018 12:34 pm

Re: JoinColumnContent with calculated columns

Post by maxlock »

Perfect! Thank you very much!
Max
Lech Kulikowski
Posts: 6247
Joined: Tue Mar 20, 2018 5:34 am

Re: JoinColumnContent with calculated columns

Post by Lech Kulikowski »

Hello

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

Thank you.
Post Reply