Results 1 to 6 of 6
  1. #1
    khartoum is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Location
    Liverpool
    Posts
    23

    Angry Report in calendar order

    I have created the query below:

    SELECT Format([tblsales].[orderdate],'mmm') AS [Month], Sum(tblsales.VAT) AS SumOfVAT, Sum([quantity]*[tblproducts.productprice]+[vat]) AS total, Sum(tblsales.Discount) AS SumOfDiscount, Sum(tblsales.[Shipping&Delivery]) AS [SumOfShipping&Delivery]
    FROM tblProducts INNER JOIN tblsales ON tblProducts.ProductCode=tblsales.ProductName
    WHERE (((tblsales.OrderDate) Between [Forms]![frmreports]![datefrom] And [Forms]![frmreports]![dateto]))
    GROUP BY Format([tblsales].[orderdate],'mmm'), tblsales.ProductName, tblsales.Quantity, tblProducts.ProductPrice, Format([tblsales].[orderdate],'mm')
    ORDER BY format([tblsales].[orderdate],'mm');

    The query extracts the monthly sales and dates it correctly in calendar order but when I have created the report from the query, the months are in alpha order. Have tried a few options in quewry design and report design but cannot get it to show in correct calendar order in report. Hoping this forum gives me the solution?


    thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Do you want to provide the project for analysis?
    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
    khartoum is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Location
    Liverpool
    Posts
    23
    Quote Originally Posted by June7 View Post
    Do you want to provide the project for analysis?
    Yes, thanks as I think the combination of my query and report maybe the cause

    It is two reports - Monthly Sales and Online Sales
    Attached Files Attached Files
    Last edited by khartoum; 03-23-2012 at 06:41 AM.

  4. #4
    khartoum is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Location
    Liverpool
    Posts
    23
    Hi June 7, have you had time to check my database in relation to the reports

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Only way I could get it to work was to base the grouping on the constructed month number field, Format([tblsales].[orderdate],'mm'). Don't even need field in a textbox on report. Can calculate that value in the query and reference that field name or in the report Group/Sort/Total settings with the Group By on expression.
    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.

  6. #6
    khartoum is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Mar 2012
    Location
    Liverpool
    Posts
    23
    Hi June, thanks for that, so simple yet could not think how to do it
    Regards KH

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

Similar Threads

  1. Calendar Type Looking Report
    By viperbyte in forum Reports
    Replies: 1
    Last Post: 02-21-2012, 02:42 PM
  2. Calendar Style Report
    By ccordner in forum Reports
    Replies: 1
    Last Post: 01-26-2012, 05:09 PM
  3. Display Report as a Calendar Help
    By jice89 in forum Reports
    Replies: 1
    Last Post: 05-16-2011, 06:20 PM
  4. Calendar Report
    By alison.justice in forum Reports
    Replies: 1
    Last Post: 06-11-2010, 04:25 PM
  5. Create a calendar report?
    By valkyry in forum Reports
    Replies: 0
    Last Post: 09-14-2006, 11:34 PM

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