PDA

View Full Version : Process reports problem



majaro
08-09-2008, 02:14 PM
I have 3 reports that have several subreports in them. One each for managers, supervisors and employees. I have a task to run them in order of Manager, Supervisor under manager and employee under supervisor. I realize that all of these people are really employees but am faced with 3 tables that hold managers, supervisors and employees.

Currently these reports are running and collectig data for all managers, supers, etc and doing page breaks one a change in name. However, this is not what I need it t do. I need to run them cronologically in order one at a time like a org chart or find a way to run them the way I have them and the do some sort of sorting. Any ideas? :dunno

OBP
08-10-2008, 09:59 AM
What relationships do you have joining your 3 Tables?
Chronologically?
Have you looked at Sorting & Grouping in the Report?

majaro
08-10-2008, 12:28 PM
Hi OBP. Yes I tried sorting and grouping but there a re three reports. How would you sort and group them? Here are my table structures. Thanks for any help.

OBP
08-11-2008, 02:20 AM
majaro, you seem to have some design "conflicts" going on in your database, you have 3 tables, everybody is in the Employee Table and then you have them again in the managers and Supervisors tables. They should either be one or the other but definitely not in both. On top of that you have the Linking table "Reportto", which is what you should have when you have 3 tables.
So you really need to decide way you are going to proceed with the design, one table or 3 tables (recommended).
The reason that I say this is that you have Relationship problems between the various tables and forms. The combos on your ReportTo Form use the EMPID (Number Long Integer) to store the Managers and Supervisors, whereas the Supervisors Table uses Alphabetic (Text) codes as IDs, so you can't Join them in the Relationships.

You also do not appear to have any actual "employees" they are all managers and Supervisors. :dunno

OBP
08-11-2008, 05:41 AM
majaro, i have made some changes to the database that you posted, the Relationships now work correctly. i have removed the managers and Supervisors form the Employee table and added some dummy records instead.
I have also added a couple of Queries to show how to bring together the ? tables with the ReportTo table, one is a "Grouped" queiry showing how that could work for you.
I have also created som Forms, a manager mainform, a Supervisor Subform with it's own Employee Subform.
You can select a manager and see the supervisors reporting to them and their Employees as well.

majaro
08-11-2008, 07:12 AM
Thanks OBP. If you were to approach this how would you go about doing this.