Page 1 of 1

Relation 1-n wont work

Posted: Mon Oct 14, 2019 9:39 am
by prinzae
Hello,

I need some help as using Stimulsoft Designer .NET;

First of all, I have a XML Datasource with some "tables" which could be structured like this:

Code: Select all

<transaction>
	<lines>
		<item>
		</item>
		<discounts>
		</discounts>
		<discounts>
		</discounts>
	</lines>
	<lines>
		[...]
	</lines>	
</transaction>
I have a Databand with datasource as "Lines" (relation "parent/child": item.id/lines.itemId).
For each lines, I'm displaying item's information such as description, price etc.
But I also have to display discount's information so I tried to add a relation on "Lines" (relation "parent/child": discounts.linesId/lines.id).

Since I can have multiple discounts per lines, it looks like it wont work because it gets only the first discounts and not all of them.
I also tried to put another databand as "Discounts" and make "SumIf condition" on Line's databand but I need another condition on the lines id so I get the exact discount for my transaction line and I dont know if I can do that.

Would someone know how I can make it work if my need is correctly detailed.

Thanks for your help,
Prinzae

Re: Relation 1-n wont work

Posted: Tue Oct 15, 2019 6:05 pm
by Lech Kulikowski
Hello,

Please send us a sample report with test data that reproduces the issue for analysis.

Thank you.

Re: Relation 1-n wont work

Posted: Wed Oct 16, 2019 12:30 pm
by prinzae
Hello Lech,

You can find a sample report in attachments.

What I need in column 4 "NET_PRICE W/O DISCOUNT" is:
- 1st line: 0.99
- 2nd line: 4.99
- 3rd line: 3.00

Re: Relation 1-n wont work

Posted: Thu Oct 17, 2019 9:46 am
by Lech Kulikowski
Hello,

Please check the modified report in the attachment.

Thank you.

Re: Relation 1-n wont work

Posted: Thu Oct 17, 2019 1:15 pm
by prinzae
So you put datasource, line's relation and master component on discounts databand.

Works like a charm.
Thanks you !!

Re: Relation 1-n wont work

Posted: Fri Oct 18, 2019 5:20 am
by HighAley
Hello.

We are always glad to help you.

Thank you.