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!

Trouble getting all rows of data from two tables on one report page. 1

Status
Not open for further replies.

rareswan

Technical User
Dec 19, 2000
22
US
I am trying to create a report from two tables

TABLE 1:

Cust_ID field1 field2 field3 field4..................
1 blah blah blah blah
2 blah blah blah blah
3 blah blah blah blah

TABLE 2:

Cust_ID field_A field_B field_C.....................
1 blah blah blah
1
1 blah blah
1 blah blah
2 blah blah
2 blah blah
2
2 blah blah blah

My problem is getting all rows from TABLE 2 for any customer on the same page of the report as the row from TABLE 1. When I run a report I get as many pages per customer as there are rows in TABLE 2 with the info from TABLE 1 on one of the pages. I would like to create a query from which I can run the report. The tables are filled with information I receive in delimited text files.

Thanks for your time and consideration,

Randy
 

1) Create a join query and save it.

Select
t1.Cust_ID, t1.field1, t1.field2, t1.field3, ... ,
t2.field_A, t2.field_B, t2.field_C, ...
From Table1 As t1
Inner Join Table2 As t2
On t1.Cust_ID=t2.Cust_ID

2) Create the report based on the join query. Make sure the grouping options don't cause page breaks with every new record on Table2. Also, make sure the imported data doesn't contain page feeds. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Hi Terry,

Thanks for the help. You were right, it was the grouping option that was troubling my report. I was trying to group by 'Cust_ID' from both tables but when I grouped by 'Cust_ID' from 'TABLE 1' only the report worked as intended.

Thanks again,
Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top