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

Linking to a table where link doesn't exist in database

Status
Not open for further replies.

Katy44

Technical User
Dec 12, 2003
723
GB
Hi,
I am trying to create a report on a very large and badly designed database. I have to link in another table, but the method of linking isn't normal (needless to say the link doesn't actually exist in the database).

Table A (already in the report) has a code in it, which is numerical. The code description is in table B. Table B consists of 3 columns:
"Domain", which is unique, "Code" which corresponds to the code in table A, and description, which is what I am trying to get to.

"Code" in table B is not unique, but IS unique for each domain. So I have tried to link code in table A to code in table B, and then put in selection criteria on the domain so that Code in table B will be unique. I don't know whether this would work or not, but Crystal 9 always freezes up while it's accessing the database. I could create a view on table B just to get the part I want, but it's not my database to start messing around with. Is there any way to create a view within Crystal, or could I do this by linking to a subreport, or anything like this? Does anyone have any ideas?
 
Katy

Your best bet would be to create a view, if this is not possible you can use a subreport.

Build subreport to bring back unique data from your unlinkable table. Then create a formula in your main report which extracts the link data. You can then use this formula to link from main to subreport.

Hope this helps

Ian Waterman
UK Crystal Consultant
 
I am unable to create a view in the database, but I have used a Crystal command to create a view within Crystal to use. It is good to know that a subreport would have been an option as well.

Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top