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

How to access multiple databases by Crystal Report

Status
Not open for further replies.

raphealchan

IS-IT--Management
Aug 3, 2001
8
SG
I am trying to use Crystal Report 8.0 to extract data from different database. Here is my database:
CSHDR.DBF (foxpro 2.6a)
use Invoice No. as Index (CS12345.CS...)
Data Field: Invoice No., Date, Amount...
DSHDR.dbf (foxpro 2.6a)
use Invoice No. as Index (DS12345.DS..)
Data Field: Invoice, Date, Amount
REHDR.DBF (foxpro 2.6a)
use Invoice No. as Index (RE12345. RE...)
Data Field: Invoice, Date, Amount

the invoice no. in CSHDR can link to the invoice no. in DSHDR and REHDR. However, the no. is totally different.
Question:
How are I choose all the data from all files for a period of time. e.g. I want to select the data range from 1/8/2001-5/08/2001), i.e.

Date CSHDR.inv CShdr.amt DShdr.inv DShdr.amt REhdr.inv REhdr.amt

01/08/2001 CS123 $125 DS124 $10 RE65 $65
02/08/2001 CS124 $100
03/08/2001 CS125 $56 DS56 $6
03/08/2001 CS126 $99 RE47 $85

The problem is I don't know how to link up all the tables and if I select a specific range of date from CSHDR, the data in DS and RE will not come out because the invoice no in RE and DE is different. Please help.
 
You can't use links to append one table onto the end of the others. Linking adds more columns to your report, not rows.

You will need subreports to display the data from the other two tables, and they will print separately in your output.

The only other option would be to use FoxPro (or another database tool) to append these tables into one table. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top