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!

one report, two tables (no relationship): how?

Status
Not open for further replies.

davesho

Programmer
Mar 7, 2001
5
US
How do i pull information from two tables (that have no relationship)? Table 1: Invoice information (multiple records, usually 10-15 records). Table 2: Special charges (pallet charges, etc., usually 2-3 records). Both tables do have the same "invoice number".
 
Then they are related, via the invoice number. Create a join on the invoice number and use the query normally.
 
Build a new query with the two tables added into it. Drag the InvoiceNo from one to the other. (I'll hope they are of similar data types.) Double-Click on the line you just created and make your choice: All records from 1 and only those from 2 or your other options. Close this dialog and Double-click or drag any fields you would like to see onto the "QBE" grid. Depending on the data you have in the two tables and what you want to see, you may choose to modify your "join" to another setting. When you have a chance take a moment and read up on building queries. They are the true power in any database.

Gord
ghubbell@total.net
 
Table 1 (invoice): 20 records
Table 2 (special charges): 3 records

When i create a relationship between the two tables (uni-join), and create a query with those tables joined, the result is a record set with 80 records. What i really want no the report is the 20 records from the invoice and the three records from the special charges, not the 80 records. :(

-Dave
 
I did try creating a subreport, and that worked. No i need to get a grand total from the subreport list (special charges) and the invoice...
 
use shared variables to send the info from your subreport to your main report...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top