Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    156

    Unanswered: Report Calculations

    I have groups of records on my report grouped in this order: Date, Section [of employees], Shift, Employee. Then their regular hours, overtime hours and the justification for those overtime hours is displayed.

    What I need to do is be able to, at the end of the report, have the regular hours and overtime hours summed up for the whole report, which I can do, but then also sum the total regular and OT hours for each section and each shift of the entire report. For example:
    Section 001/002 Total Regular Hours: 200 Total OT Hours: 28.
    Shift: Regular First 80 Second 70 Third 50
    OT First 12 Second 9 Third 7

    I don't know how to isolate the hours for each Section or Shift and sum them up at the end of the report. I've thought about using subreports based on separate queries and placing them at the end of the report. Your suggestions would be greatly appreciated!

    Please help!
    DocX

    The teachings of God's Begotten: 2 John 1:9

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    What are youusing for shift identification? You can use a combination of sum() and iif().

    =sum(iif(SomeGroupingField = SomeCriteria, SomeGroupingField, 0))
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    You'll want to look at Sorting and Grouping. When you are in design view, go to View, Sorting and Grouping. If you add Section and Shift to the list of fields to group on then put in Yes for group footer it will add a couple of sections to your report. Here you can copy and paste the sums from the report footer to each of the shift and section groups.

  4. #4
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    Sorry. Reread the post and my post will not help you. If you want to show the totals at the bottom of the report then I would go with subreports. However if you can, base your queries on the data in the first query. That way if the calculation changes then you are not updating multiple queries. You should be able to select and group by the Shift and the Section in two different queries to get the totals.

  5. #5
    Join Date
    Jul 2004
    Posts
    156
    Is there a way to reference totals from a certain section? That would help me a lot. I've been trying to find the exact events that may occur between each section. That would be another good alternative. Anyone know much about report section events?

    Thanks!
    DocX

    The teachings of God's Begotten: 2 John 1:9

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •