Grouping results of different queries/data sources

Stimulsoft Reports.NET discussion
Post Reply
stani8048
Posts: 5
Joined: Wed Jul 13, 2016 8:11 am

Grouping results of different queries/data sources

Post by stani8048 »

Hi

I've got one report with two data sources/queries.

for e.g. data source / query 1 contains:
- all cars
- the configuration of each car

data source / query 2 contains:
- all cars
- the characteristics (consumption , speed) of each car

In the designder i put everything in one group (grouping by data source 1 car ID).

At the moment the report looks like:
car x
configuration x1
configuration x2
configuration x3...

car y
configuration y1
configuration y2...

car z
configuration z1
configuration z2...

characteristics x1
characteristics x2
characteristics x3...
characteristics y1
characteristics y2...
characteristics z1...
But it should look like this:
car x
configuration x1
configuration x2
configuration x3...
characteristics x1
characteristics x2
characteristics x3...

car y
configuration y1
configuration y2...
characteristics y1
characteristics y2...

car z
configuration z1
configuration z2...
characteristics z1...
I tried to solve this with a relation via car ID.
But it doesn't work because the records of data source / query 2 are multiplying themselves then. And it was not grouping correctly too.

Thank you!

KR
Alex
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Grouping results of different queries/data sources

Post by Alex K. »

Hello,

Can you please send us your report with test data for analysis.

Thank you.
stani8048
Posts: 5
Joined: Wed Jul 13, 2016 8:11 am

Re: Grouping results of different queries/data sources

Post by stani8048 »

I solved it :).

My solution is to add a subreport to the groupfooter.
In this subreport is the databand with a filter to carID.

It seems to be a little strange because i cannot add a databand to a group header or group footer, but I can add a sub report to a group header and footer which has a databand inside.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Grouping results of different queries/data sources

Post by Alex K. »

Hello,

Ok.
Let us know if you need any additional help.

Thank you.
Post Reply