Results 1 to 7 of 7
  1. #1
    DGBagby is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    4

    Question Exporting a report to Excel

    I hope someone can explain why and what I need to do. I have an Access report that my users want exported to an excel spreadsheet.

    The report contains the following structure:

    Report Header

    Detail Header
    ---------
    Detail
    Detail
    Detail
    ---------
    Detail Footer with Totals

    Detail Header
    ---------
    Detail
    Detail
    ---------
    Detail Footer with Totals

    The detail totals for each section have eight columns with totals, all formals:
    Qty Mailed: =Sum([Qty Mailed])
    Qty Ordered: =Sum([Qty Ordered])
    IncPc: =Sum([DIncome])/Sum([Qty Mailed])
    CostPc: =Sum([DCosta])/Sum([Qty Mailed])
    Net/Pc: =Sum([Dincome]-[DCosta])/[QtyMail]
    LCost/Pc: =Sum([TLCost/Pc])/Sum([Qty Mailed])
    Avg Gift: =Sum([DIncome])/Sum([Donors])
    & Resp: =(Sum([Donors])/Sum([Qty Mailed]))*100

    The report on paper works perfectly. If I try to export the report to excel, it opens in excel formatted correctly, however, totals for each detail section only show in the first two columns. The remaining six columns are empty on the excel sheet. All eight are formulas and I do understand that only the result will show, which is exactly what I want.

    I tried everything I can thing of including starting a new database with just data and a new, simpler version, of the the report. I still only get totals results in the first two columns.

    This is work data so I cannot share it but if you need more info please ask and I'll see what I can come up with.
    I need to know:
    1) what am I missing or
    2) Is access unable to provide results for more than two columns.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    You could provide a copy of the db with dummy data.

    Access reports often do not export nicely to Excel, especially if there is grouping.

    Unless something has changed with 2013, Detail does not have header and footer sections, there is only Detail. So what do you mean by Detail Header/Footer?
    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
    DGBagby is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    4
    Yes I can. I have a sample ready to go. How do I get it to you? I don't see how to attach files.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    Instructions at bottom of my post.
    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.

  5. #5
    DGBagby is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    4
    I have attached the database sample and a sample of the excel export.

    Thank you!
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,627
    Interesting, the export can't handle the percentage calculations. These expressions refer to fields in the RecordSource but are not on the report. What I tried:

    1. bind textboxes to fields DIncome, DCosta, TLCost/Pc, Donors in Detail section

    2. textboxes in List footer for Sum calcs on those 4 fields

    3. change expressions in percentage calcs to reference textbox names

    Unfortunately, still does not work. Sorry, apparently the arithmetic calcs cannot export.

    I then tried changing the percentage calcs to an Avg() aggregate, like: Avg([Inc/Pc]). Those calcs do export.


    Advise not to use spaces or special characters/punctuation (underscore is exception) in naming convention. Better would be Cost_Pct, PctResp.
    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.

  7. #7
    DGBagby is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Feb 2015
    Posts
    4
    Thank you so much! Even though using Avg doesn't give me the correct result, you did clear up why excel isn't accepting the formulas.

    You were of great assistance. If only I knew enough to make custom functions.

    Again, thanks! You are appreciated!

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

Similar Threads

  1. Exporting a Access Report to an Excel File
    By Coffee in forum Import/Export Data
    Replies: 2
    Last Post: 07-28-2014, 11:32 AM
  2. Exporting 2010 Web Database report to Excel
    By rogstepper in forum Import/Export Data
    Replies: 2
    Last Post: 09-12-2012, 01:52 PM
  3. Exporting the report to MS Excel
    By Blunty in forum Reports
    Replies: 7
    Last Post: 06-22-2012, 10:41 AM
  4. Exporting Report to Excel via Command Button
    By need_help12 in forum Import/Export Data
    Replies: 3
    Last Post: 04-24-2012, 03:27 PM
  5. Exporting a Report to Excel
    By bullwinkle55423 in forum Reports
    Replies: 0
    Last Post: 12-11-2007, 10:27 AM

Tags for this Thread

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