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!

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, Cust_ID is the first field.

TABLE 1:

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

TABLE 2:

Cust_ID field_B field_C field_D.....................
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
 
Hello Randy,

How about this?

Do a basic select query where table1.custID=table2.custID.

Base your report on that query and then within that report do a "group by" on the Cust ID. Place the CustID and all information from table1 (field2,field3,field4,field5) in the group header. Then put all the stuff from table2 (field_B,field_C,field_D) in the detail section - then you get one line of info from table1, and then all applicable lines from table2 listed underneath.

Regards,
Rayna
 

Rayna,

Will you marry me?

Thanks for the help. I had previously done just as you suggested however I was trying to include the Cust_ID from both tables which derailed the way my report was looking.


Thanks,
Randy
 
Randy,

Not sure I have ever been asked for my hand in marriage on a forum before ;-) Besides, you'd have to come to Canada <grin>

Glad I could help you in your quest!

Rayna
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top