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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Subreport Keeps Repeating Itself
Hello,
I am having a problem with a report. I am trying to print out paystubs for employees over a given time period. I have a start up form in which the user types in the “StartDate” and the “EndDate” of the pay period which is 2 weeks. I need to be able to calculate the regular/overtime hours for each week so I created two queries, “qryPayrollWeek1” and “qryPayrollWeek2”. Each of these queries contains the same fields: Operator/DateWorked/HoursWorked/RegularHours(Calculated Field)/OvertimeHours (Calculated Field). Both of these queries work great. When I type in a StartDate and EndDate, I get a record for each day for each employee within the date range with all of the correct information. I now want to produce a pay stub for each employee through a report. I built a report and have 2 subreports (one referring to week 1 and one referring to week 2). I have tried to have various tables/queries as the main report but I keep getting asked for the Start/End dates over and over (I am assuming for each record in each query as well as each record in the main part of the report). This produces a report that is pages long. I do understand Parent/Child fields and I have tried various combinations of what I think would relate the main report with each subreport but no matter what table/query I try and have as the main report, the same thing happens. I am just wondering if I need to build a new query for the main part of the report (and try ans SELECT DISTINCT for each employee within both payroll queries) or if I should just somehow link back to the table which stores the individual employee information (tblEmployees). The field “Operator” is not the primary key but is found in tblEmployees as well as both the payroll queries. I tried this once before already with no luck but maybe I am looking at this the wrong way. Any help would be greatly appreciated. Thanks in advance. Joel -- Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|