A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Multiple lines from different tables in a report detail



 
 
Thread Tools Display Modes
  #1  
Old May 12th, 2010, 03:14 PM posted to microsoft.public.access.reports
Ben Slater
external usenet poster
 
Posts: 1
Default Multiple lines from different tables in a report detail

I'm not sure if I can easily describe what I'm trying to do here, but here
goes...

Let's say I'm trying to make a report that describes the vehicles each
person in my database owns. So I have a table for each person, a table for
cars, and a table for pickup trucks. There's a one to many relationship from
each person to the car table, and from person to trucks. The car and truck
tables don't have the same fields, so I need them to be different tables. I
want my report to look like this:

Person Car Name Car Mileage Truck Name Cargo Capacity
Ben Dodge Colt 50mpg Chevy S-10 40 cubic ft
Ben Ford Aspire 34mpg
Mary Ford F-150 100
cubic ft
Mary Dodge Ram 90 cubic
ft

All this data is in SQL Server, I'm just using Access to generate a report,
so I can use stored procedures, views or anything to get my results. Does
anyone have any advice for me?
  #2  
Old May 12th, 2010, 03:45 PM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Multiple lines from different tables in a report detail

I would use a main report based on the person table and subreports for the
other tables.

I am going to take your word for "so I need them to be different tables"
since I doubt this is actually about cars and trucks :-)
--
Duane Hookom
Microsoft Access MVP


"Ben Slater" wrote:

I'm not sure if I can easily describe what I'm trying to do here, but here
goes...

Let's say I'm trying to make a report that describes the vehicles each
person in my database owns. So I have a table for each person, a table for
cars, and a table for pickup trucks. There's a one to many relationship from
each person to the car table, and from person to trucks. The car and truck
tables don't have the same fields, so I need them to be different tables. I
want my report to look like this:

Person Car Name Car Mileage Truck Name Cargo Capacity
Ben Dodge Colt 50mpg Chevy S-10 40 cubic ft
Ben Ford Aspire 34mpg
Mary Ford F-150 100
cubic ft
Mary Dodge Ram 90 cubic
ft

All this data is in SQL Server, I'm just using Access to generate a report,
so I can use stored procedures, views or anything to get my results. Does
anyone have any advice for me?

  #3  
Old May 12th, 2010, 05:16 PM posted to microsoft.public.access.reports
Ben Slater[_2_]
external usenet poster
 
Posts: 1
Default Multiple lines from different tables in a report detail

Ah, subreports look promising. Thanks. The easiest way is to make a
seperate subreports for the car and truck tables, right?

And you're correct about the data not really being cars and trucks, but I
wanted to keep my example simple.

"Duane Hookom" wrote:

I would use a main report based on the person table and subreports for the
other tables.

I am going to take your word for "so I need them to be different tables"
since I doubt this is actually about cars and trucks :-)
--
Duane Hookom
Microsoft Access MVP


"Ben Slater" wrote:

I'm not sure if I can easily describe what I'm trying to do here, but here
goes...

Let's say I'm trying to make a report that describes the vehicles each
person in my database owns. So I have a table for each person, a table for
cars, and a table for pickup trucks. There's a one to many relationship from
each person to the car table, and from person to trucks. The car and truck
tables don't have the same fields, so I need them to be different tables. I
want my report to look like this:

Person Car Name Car Mileage Truck Name Cargo Capacity
Ben Dodge Colt 50mpg Chevy S-10 40 cubic ft
Ben Ford Aspire 34mpg
Mary Ford F-150 100
cubic ft
Mary Dodge Ram 90 cubic
ft

All this data is in SQL Server, I'm just using Access to generate a report,
so I can use stored procedures, views or anything to get my results. Does
anyone have any advice for me?

  #4  
Old May 13th, 2010, 01:02 AM posted to microsoft.public.access.reports
Duane Hookom
external usenet poster
 
Posts: 7,177
Default Multiple lines from different tables in a report detail

Yes, you could create separate subreports for cars and trucks. If you include
cars in your main report, the trucks would be a subreport in the person group
header or footer section.

--
Duane Hookom
Microsoft Access MVP


"Ben Slater" wrote:

Ah, subreports look promising. Thanks. The easiest way is to make a
seperate subreports for the car and truck tables, right?

And you're correct about the data not really being cars and trucks, but I
wanted to keep my example simple.

"Duane Hookom" wrote:

I would use a main report based on the person table and subreports for the
other tables.

I am going to take your word for "so I need them to be different tables"
since I doubt this is actually about cars and trucks :-)
--
Duane Hookom
Microsoft Access MVP


"Ben Slater" wrote:

I'm not sure if I can easily describe what I'm trying to do here, but here
goes...

Let's say I'm trying to make a report that describes the vehicles each
person in my database owns. So I have a table for each person, a table for
cars, and a table for pickup trucks. There's a one to many relationship from
each person to the car table, and from person to trucks. The car and truck
tables don't have the same fields, so I need them to be different tables. I
want my report to look like this:

Person Car Name Car Mileage Truck Name Cargo Capacity
Ben Dodge Colt 50mpg Chevy S-10 40 cubic ft
Ben Ford Aspire 34mpg
Mary Ford F-150 100
cubic ft
Mary Dodge Ram 90 cubic
ft

All this data is in SQL Server, I'm just using Access to generate a report,
so I can use stored procedures, views or anything to get my results. Does
anyone have any advice for me?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.