Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Problem -- CR Novice

Status
Not open for further replies.

mesagreg

Programmer
Mar 3, 2001
53
US
I'm using the CR version that ships with VB.NET to create a report using an ADO.NET dataset.

The dataset contains four tables. There are one-to-many relationships between the primary key in one table and foreign keys in the other three. For example, there is a class table that has a ClassID field that is the primary key. The Method, Event, and Property tables all have foreign key fields called ClassID. Each of these tables also has a Name field.

I want to create a report that lists each class in the Class table, and then lists all the Properties for that class, then all the Methods for that class, then all the Events for that class.

Can someone give me some guidance on how to do this?

Thanks,

Greg
 
Greg,
If your version of Crystal supports subreports, that's the way to go.

Note that you can't simply join all the tables because if a given Class has 2 methods, 3 events, and 4 properties,
you would end up with 24 (2*3*4) records for just that Class.

Cheers,
- Ido

ixm7@psu.edu
 
If I understood this right (and I'm not sure I did!), I would do the following:

1. Group the report on Class.ClassID

2. Create 3 detail lines

3. Place SubReport 1 in D1 with link field Class.ClassID to Property.ClassID

4. SubReport 2 in D2 with link field Class.ClassID to Method.ClassID

5. SubReport 3 in D3 with link field Class.ClassID to Event.ClassID

Naturally, each of the SR's will contain the info we wish to present on the report. Not exactly the way for a 'novice' to start with CR!

HTH, John Marrett
Crystal Reports & Crystal Enterprise Trainer
 
Thanks, guys. I bought a book on CR last night, and it after reading it, the subreport looked like the way to go. I'll give it a shot.

Greg
 
greg-

what book did you buy just out of curiosity? Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
I bought "Crystal Reports 8.5: The Complete Reference" by George Peck, published by Osborne. It's pretty good, but I would prefer one that has a few more step-by-step walkthroughs.

Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top