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!

when databases won't link

Status
Not open for further replies.

dmccallum

Programmer
Jan 5, 2001
90
US
I have a report using two databases. The report uses one database to list the jobs done and the amount spent on the work but the jobs are in code. The second database contains the code and the description. The two databases won't link. How can I take a record from one database and seach through the second for a matching code so I can print the description? I tried if header.jobcode = jobcode.jobcode then job.description but I get no results.
 
Hi

The problem that you are having is probably from the way that you are linking your tables together in your report. To help you resolve this issue, please look over our linking whitepaper which can be found on our website at the following location:


Once here please do a search for the follwoing file:

SCR_PCLINKING.PDF

This document expalins the differnt kinds of table joins that you can create in your report, and the different ways in which records are returned to your report because of them. I believe that once you look over this document you shoudl be able to accomplish what you are trying to do. If you cannot get them to link properly, you might need to use subreports.
I hope that this helps point you in the right direction.

Please let me know if you still have the same issue. E. McEvoy
Crystal Reports Consultant
 
If the tables won't link, then you can do what you are describing with a linked subreport. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
I used the suggestion of a linked sub-report and it works perfectly except for the pie chart I want to use. I have the pie chart show the individual job codes but it won't let me use the description found in the sub-report; it insists on using only the numbers found in the main report. How can I work around this?

Thanks!
 
You could use a shared variable to pass the description from the sub-report to the main report.

Cheers,
- Ido
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top