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

Linking and data Problem - HELP!!

Status
Not open for further replies.

marabou

IS-IT--Management
Jan 12, 2001
86
GB
I have a problem with the data my report is generating. Within the Visual Linking Expert I have 3 tables - Customers, Licences and Notes. Customers have Licences and Notes.
There are Notes with the type of Licence, but they are only linked through the customer. Not every Customer has a Note.

The Visual Linking expert will not let me link Customers and Notes ( I keep getting a selection error), however it will let me link Licences and notes ????. This is causing a huge problem as it is completely messing up the data. It is also only displaying those licences which have notes.

Has anybody any ideas? I have been working on this for days!!

I am using Crystal 8 with an Oracle server.

Thanks in advance
 
The error was a dll message, selection not valid. I have got as far as realising I needed an outer join within my link, which worked. But now I need to use a multiple-row sub query ( I don't know what one is though). As the complexity of the query has increased, I have decided to make a view in Oracle 8i and SQL Plus.

I have Customers who have an id, Contacts, which are linked using the foreign key CustomerID and Licences which are linked using the foreign key CustomerID.
There are customers, who have may have none, one or many licences and contacts.

So I need to work out how to do a multiple-row subquery, as the query is producing the right results, but stops as soon as it gets to where there is more than one contact in the result set it errors. It does the same in Crystal Reports.

[Select Customers.customerID, LicenceID,
(Select Contacts.CustomerID
FROM Contacts, Customers
Where Contacts.customerID (+)= Customers.customerID
FROM Customers, Licences
Where Customers.customerID = Licences.customerID]

I can't find any references on how to do multiple-row subqueries anywhere.

Can I do them in Crystal Reports?

Thanks in advance




 
And what happened to the Notes table?
When does the error occur (linking which two fields)?
Does the error occur if there are only those two tables or only if there are three tables?

You have 2 different one-to-many joins which will give you an inflated result set, even if you get beyond this error. The simplest way to deal with this within CR is to use a subreport to get the data from one of these tables. Ken Hamady
Crystal Reports Training and a
Quick Reference Guide to VB/Crystal
 
Thanks for the advice, no problem at all now I have used subreports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top