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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL PROCESSING ORDER 2

Status
Not open for further replies.

shaunk

Programmer
Aug 20, 2001
402
0
0
AU
I am connecting to Oracle thru an ODBC connection and on Crystal V 8.0.
I have three tables: Client, Client_Alerts and Client_Contacts.
There can be many Client_Alerts for one Client, and many Client_Contacts for one Client. Client Id is in all three tables. Client is logically linked to the other two but there is no logical relationship between the other two.
The report is grouped by Client.Client_Id.
For each Client, I want to process all of Client_Alerts and then all of Client_Contacts.
The result should look like:
CLIENT_ID
Data from Client_Alert Record1
Data from Client_Alert Record2
Data from Client_Alert Record..n

Data from Client_Contacts Record1
Data from Client_Contacts Record2
Data from Client_Contacts Record..n

At present, it is looking up Client_Alerts and Client_Contacts at the same time. So the result looks like:
CLIENT_ID
Data from Client_Alert Record1
Data from Client_Contacts Record1
Data from Client_Alert Record2
Data from Client_Contacts Record2
Data from Client_Alert Record..n
Data from Client_Contacts Record..n

Is this a problem with the ODBC driver?
I can see the options I need in the Linking Expert but they are low-lighted ?

Any help is much appreciated.
 
You could insert two subreports - one for each table - but I'm not sure this is the easiest way.

Tomaz
 
There are a couple of choices here. You could use a sub report, although for every sub report a separate query is run which effects report performance.

From what I can see from your report description you may be able to use Cross Tabs.
Cross tabs are very easy to use and you can place as many of them as you like, say in the report header (in this case it looks like you could use 2).
This will give the report the appearance that you desire.
Gary Rogers CrystalDesk (Report Scheduler)
Crystal Reports training, consulting, and software interface development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top