Results 1 to 4 of 4
  1. #1
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192

    Monthly report with weekly totaSs

    Dear Members,
    I have got a report with four columns. The first column is the date column, the second raw cotton issued, the third lint generated and the fourth seed generated.



    The report is a monthly report, with the monthly totals in the report footer section.
    What I want is it should show the weekly group totals, e.g., for January 1st to 7th, 8th to 14th, 15th to 21st 22nd to 28th and 29th to 31st. For a particular date where there is no processing, it should return ‘0’.
    For the month of February it should be the days based on the leap year.
    Please inform if it is possible & if so the solution.

    Regards
    Alex

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Won't be simple. Your 'week' is not based on a standard 7 days, like Sun - Sat and not every 'week' has 7 days. Need a field that has week identifier. Can be calculated.
    Showing data where there are no records is another complication.
    Last edited by June7; 09-27-2015 at 10:42 AM.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Alex Motilal is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Nov 2008
    Location
    Coimbatore, India
    Posts
    192
    Thanks June7
    If it can be done based on standard weeks and no need to show nil records, please intimate the solution.
    Regards
    Alex

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,943
    Date of the first day of week that any date falls in can be calculated.

    What day do you want to be the beginning of a week - Sunday? This will give you 7-day weeks but some will cross months and years

    FirstDayofWeek: ([DateField] - Weekday([DateField]))+ 1

    Or use DatePart to pull year week number:

    YrWk: Year([DateField]) & DatePart("ww", [DatePart])

    Again, some weeks will cross months but will not cross years and 2 weeks can be less than 7 days.

    Unfortunately, no intrinsic function to pull the month week number, which is actually your original requirement and can also be calculated, like:

    YrMoWk: Year([DateField]) & Format([DateField]),"mm") & Switch(Day([DateField])<=7,1, Day([DateField])<=14,2, Day([DateField])<=21,3, Day([DateField])<=28,4, Day([DateField])<=31,5)

    Use whichever as grouping criteria.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. weekly timetable report format
    By merlin777 in forum Reports
    Replies: 14
    Last Post: 10-27-2014, 11:06 AM
  2. Replies: 1
    Last Post: 05-30-2013, 11:29 PM
  3. Replies: 6
    Last Post: 11-10-2012, 09:49 PM
  4. Replies: 1
    Last Post: 06-22-2011, 07:55 PM
  5. Is weekly / monthly automation possible?
    By 10 Gauge in forum Access
    Replies: 4
    Last Post: 03-17-2011, 07:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums