Report With Line Details From 3 Different Tables

notoca

New Member
Joined
Sep 8, 2003
Messages
37
Hi

I'm trying to produce a report, however, it is complicated by the fact that the information is coming from 4 different tables and even though they have the same key field in common, the line detail of each table have nothing in common with each other. When I bring the three line details together, via a query, into the detail section of the report I keep getting doubled up information because of the fact the line details from the three tables have nothing in common so a duplicated line is created for each line of the table that has the most values. That is: if table 1 has 1 value, table 2 has 3 values, table 3 has 6 values. So when you bring them all together the query creates 6 lines for because table 3 has 6 values. The 6 values in table 3 are valid but table 2 and 1 do not need six lines.

In theory what I need is a report that allows 3 different detail areas but as far as I can see that is not possible. I looked at sub reports but that does group all the like information to the key field value. it just puts another report at the bottom of the main report.

Any ideas??? Why is that when you design your database correctly it's usually a hell of a job trying to manipulate the data to do what you want. If I designed 1 table to incorporate all the fields in tables 1, 2 and 3, I'd be breaking all the design rules but producing this report would be a hell of a lot easier. However, I would then lose a lot of flexibility and functionality when it came to sorting, grouping and searching because I would then instead of having one field named Signatory, I would have a multiple number of fields to achieve the same result ie Signatory1, Signatory2, Signatory3, Signatory4, Signatory5, etc. Good grief!!!!
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Have you tried using Grouping? You can use three Group Headers to have something similar to three detail sections.

I am still guessing though that there may be problems with your database design. Normalizing your tables usually makes data easier to work with, not harder.
 
Upvote 0
hi jmiskey

I tried groupin, however that only allowed one record of many to be printed. You could be right about my table designs not being right. I'll give you a basic overview of the setup:

The main table is "Project Details". This has the following fields (a 1 to 1 relationship): Project No (key), Project name, Project manager, Project description, etc. Here you have only one project name, one project manager and one project description.

The next table is "Project Signatories". The fields are Project No (key) and Signatory. Because a project no can have from 1 to 6 signatories I had to put signatories in a different table because it had a 1 to many relationship.

The same with the Key Words table. There are multiple keywords to one project number.

Also, A table for "Funding Sources". A project number can have many funding sources.

A table for budget contacts: A project can have many budget contacts.

And so on. If I understand Access properly I had to create these different tables. This way if I wanted to be able to list all project Nos that can be signed by a particular signatory; or if I wanted to list all the projects that came under the control of a particular budget contact then it is very asier to do this.

However, when I need to bring all this info together in one report to create an overall profile of the project no thn this is where I get stuck.

The profile report should show:
General info section: Project no, Project name, project manager, project description.
Funding Sources Section: detail from the funding sources table
Budgeting Contacts Section: detail from the budgeting contacts table

A Signatories section: detail from the signatories table

key words section: detail from the key words table.

As you can see there is a lot of detail data and reports only have one detail section which cannot handled all this info properly.

What do you think?
 
Upvote 0
hi jmiskey

I tried groupin, however that only allowed one record of many to be printed. You could be right about my table designs not being right. I'll give you a basic overview of the setup:

The main table is "Project Details". This has the following fields (a 1 to 1 relationship): Project No (key), Project name, Project manager, Project description, etc. Here you have only one project name, one project manager and one project description.

The next table is "Project Signatories". The fields are Project No (key) and Signatory. Because a project no can have from 1 to 6 signatories I had to put signatories in a different table because it had a 1 to many relationship.

The same with the Key Words table. There are multiple keywords to one project number.

Also, A table for "Funding Sources". A project number can have many funding sources.

A table for budget contacts: A project can have many budget contacts.

And so on. If I understand Access properly I had to create these different tables. This way if I wanted to be able to list all project Nos that can be signed by a particular signatory; or if I wanted to list all the projects that came under the control of a particular budget contact then it is very asier to do this.

However, when I need to bring all this info together in one report to create an overall profile of the project no thn this is where I get stuck.

The profile report should show:
General info section: Project no, Project name, project manager, project description.
Funding Sources Section: detail from the funding sources table
Budgeting Contacts Section: detail from the budgeting contacts table

A Signatories section: detail from the signatories table

key words section: detail from the key words table.

As you can see there is a lot of detail data and reports only have one detail section which cannot handled all this info properly.

What do you think?
 
Upvote 0
As I wrote the last email it dawned on me a way to do this and it appears to have worked. I'll need to do a bit of testing to make sure it is picking up the write data.

Thanks
 
Upvote 0

Forum statistics

Threads
1,221,621
Messages
6,160,879
Members
451,675
Latest member
Parlapalli

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top