Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Having trouble grouping Post Reply Post New Topic
Author Message
michaelwl
Newbie
Newbie
Avatar

Joined: 02 Aug 2007
Location: South Africa
Online Status: Offline
Posts: 11
Quote michaelwl Replybullet Topic: Having trouble grouping
    Posted: 27 Sep 2007 at 7:15am
I've got a subreport in my main report and if I could have the subreport have a subreport I wouldn't have a problem. So at this stage Im hoping I can get what I want by using some type of grouping.

So in my subreport I've got headings in the report header then fields in the details section, what I need is the multiple lines associated to each of the lines in my details section to be displayed... How do I get this effect without using a subreport?
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 27 Sep 2007 at 9:16am

If you  can give us some idea of the data field names, and whether the data is from the same or different tables we could probably help. You would need to tell us how the data is related as well.

Finally if you could give us some idea of about the layout you want to achieve.I suspect will be easier than you think.
 
 
Regards,
 
John W.
 
IP IP Logged
michaelwl
Newbie
Newbie
Avatar

Joined: 02 Aug 2007
Location: South Africa
Online Status: Offline
Posts: 11
Quote michaelwl Replybullet Posted: 27 Sep 2007 at 11:19pm
Excellent... Well here goes:

I Have two tables. CTIL and TILA tables. For every one record in CTIL there is one or more records in the TILA table. The primary key field in CTIL is CTIL_REFERENCE the foreign key field in TILA is TILA_REFERENCE.

Basically what I need it to look like is:

One row of data from CTIL must appear, then directly after all the corresponding fields from TILA, then the next CTIL fields and the next corresponding TILA fields and so on...

The above is happening in a sup report.

Thanks for the help, my SQLs gone all rusty.
IP IP Logged
jkwrpc
Senior Member
Senior Member


Joined: 19 Jun 2007
Location: United States
Online Status: Offline
Posts: 432
Quote jkwrpc Replybullet Posted: 28 Sep 2007 at 11:07am
You will need to clean this up.
 
Create a select query that uses a left outer join. You can use a Command Object to do this.
 
It might look something like this (add the fields you want on the report).
 
SELECT CTIl.datafieldname, CTIL.DatafieldName,CTIL.Reference,TILA.datafieldname
From CTIL
LEFT OUTER JOIN TILA ON CTIL.Reference = TILA.Reference
 
You then layout your report sections something like this...
 
GrpHeader (CTILReference)
Detail (Information from TILA table)
 
The details will change everytime the GroupHeader changes. If everything is working correctly only the those details for that reference number will show.
 
Hope this will get you started in the right direction.
 
Regards,
 
John W.
 
IP IP Logged
michaelwl
Newbie
Newbie
Avatar

Joined: 02 Aug 2007
Location: South Africa
Online Status: Offline
Posts: 11
Quote michaelwl Replybullet Posted: 28 Sep 2007 at 11:49pm
Thanks so much for your help. Will try this first thing when I go back to work.
IP IP Logged
michaelwl
Newbie
Newbie
Avatar

Joined: 02 Aug 2007
Location: South Africa
Online Status: Offline
Posts: 11
Quote michaelwl Replybullet Posted: 01 Oct 2007 at 6:37am
Thanks so much. I'm a real crystal newbie... The grouping worked like a charm!!!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.