Wednesday, March 7, 2012

GROUP BY on same line?

Hi,
I want to do a group by in a Report (RS 2005), but the group by has to be on
the same line. For instance:
Imagine I have a table tblPerson (Name, FirtsName, Country, DateOfBirth,
...)
- Simpson, Homer, USA, 12-12-1970
- Johnson, Bart, Belgium, 05-02-1978
and a tblCars (Brand, Color, Year)
- Toyota, Blue, 2000
- Ford, Red, 2002
- Mercedes, Yellow, 1998
And Homer has the totyota and the Ford, and Bart has the Mercedes.
I would like to have my report-output like this:
Simpson, Homer, USA, Totoya, Blue
Ford, Red
Johnson, Bart, Belgium, Mercedes, Yellow
And not like this:
Simpson, Homer, USA
Totoya, Blue
Ford, Red
Johnson, Bart, Belgium
Mercedes, Yellow
How can I do this?
Thanks a lot in advance,
PieterHi,
Can be done. Done give the Give the "Name" e.g. Simpson in group header.
Instead give it in the detail itself and just right click the name field
textbox and check the "hide duplicate"
Amarnath
"Pieter Coucke" wrote:
> Hi,
> I want to do a group by in a Report (RS 2005), but the group by has to be on
> the same line. For instance:
> Imagine I have a table tblPerson (Name, FirtsName, Country, DateOfBirth,
> ...)
> - Simpson, Homer, USA, 12-12-1970
> - Johnson, Bart, Belgium, 05-02-1978
> and a tblCars (Brand, Color, Year)
> - Toyota, Blue, 2000
> - Ford, Red, 2002
> - Mercedes, Yellow, 1998
> And Homer has the totyota and the Ford, and Bart has the Mercedes.
> I would like to have my report-output like this:
> Simpson, Homer, USA, Totoya, Blue
> Ford, Red
> Johnson, Bart, Belgium, Mercedes, Yellow
> And not like this:
> Simpson, Homer, USA
> Totoya, Blue
> Ford, Red
> Johnson, Bart, Belgium
> Mercedes, Yellow
> How can I do this?
> Thanks a lot in advance,
> Pieter
>
>|||Thanks! That worked!

No comments:

Post a Comment