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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport summarizing data

Status
Not open for further replies.

HowieG

Programmer
Oct 12, 2001
64
CA
I have a report that will print line-item details of any number of timesheets, and I want a summary by Job of the jobs they worked on after each change in worker.

Primary Tables:
Code:
tblTSHeader (TSID, WorkerID, ...)
tblTSDetail (EntryID, TSID, TSDate, JobID, HrsReg, HrsOT1, HrsOT2 ...)

Sort order of Main report: WorkerID, TSID, EntryID

So, for each change in WorkerID, I want a section summarizing the data for that section (which is always one worker, but may be more than one Timesheet), by JobID. For example:

Code:
JobID   HrsReg   HrsOT1 ...
1-100   25       4
1-220   17       3
2-120    4       0
TOTAL   46       7

I've tried using a subreport in the WorkerID Footer section, but can't figure out how to get the subreport to only include data appropriate for that section.
 
Got it! [smile]

Managed to finally get it to work using a combination of things:
- a global variable for the filter on TSID's incorporated into the subform's SQL recordsource (in the on_open event)
- using the child/parent linking fields to link the WorkerID field

I got hung up in the me.filter of the subform, which I now realize does not work on a subform.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top