Results 1 to 3 of 3
  1. #1
    Tlo is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    41

    Export Report With Multiple Sub-Reports To PDF Missing Pages

    Hello All,



    I'm trying to export a report to PDF. The report has 11 sub-reports (formatted to fit 11 pages in report). When I open the report in print preview all 11 pages show up perfectly. When I click the export button I've built, 11 pages get exported but the last page is blank. If I close the PDF, then click the export button on the report 10 pages get exported, but the last page (page 10) is blank. If I close the PDF, then click the export button on the report 9 pages get exported, but the last page (page 9) is blank. So it seems that every time (while the report remains open) I click the export button a page gets "trimmed" off the report.

    The odd thing is that I have another report with 11 sub-reports that is based on another query that exports fine. The report in question is based on an aggregate query while the report that is exporting property is based on a regular select query. Seems awfully strange how it "trims" a page every time export button is clicked. Here is the code behind the button...seems very simple. I'm using Access 2016. Thanks in advance for any help.

    Private Sub cmdExportPDF_Click()

    Docmd.OutputTo acOutputReport, "rptContractSummary_MasterRFP", acFormatPDF, , True

    End Sub



  2. #2
    Tlo is offline Advanced Beginner
    Windows 8 Access 2013
    Join Date
    Jan 2016
    Posts
    41
    Quick correction - both reports are based on aggregate queries.

  3. #3
    Tlo is offline Advanced Beginner
    Windows 8 Access 2016
    Join Date
    Jan 2016
    Posts
    41
    Another note: in a previous post I brought up a similar issue, but the query that the report was based on was 255 fields wide and it was suggested that I revisit my table and query design. I've done that, and the query that the report is based on now is only 20 fields or so. Also, the report I mentioned above in my first post that is working correctly is the result of that table/query redesign and works perfectly. When it was based on the massive query it would take over a minute to export, if it did at all. Now it exports within a few seconds.

    With the report I'm having trouble with now, I tried clicking export, opening the PDF, closing the PDF and then repeating until I got a critical error. After doing that 7-8 times I got the awful "Cannot Open Any More Databases" error message.

    The end product of these reports look identical, they're just based on two different queries. The queries are almost identical. The only difference is the report that is not working is based on a aggregate query that has an aggregate sub-query, whereas the report that is working is based on a aggregate query whose sub-query is not an aggregate query.

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

Similar Threads

  1. Replies: 0
    Last Post: 04-15-2016, 08:08 AM
  2. Replies: 9
    Last Post: 08-26-2014, 10:43 AM
  3. Replies: 2
    Last Post: 03-05-2013, 10:52 PM
  4. Query and Export into Multiple Reports
    By AKoval in forum Reports
    Replies: 1
    Last Post: 02-16-2013, 09:20 AM
  5. Export Report to Single PDF Pages
    By 02kev02 in forum Import/Export Data
    Replies: 2
    Last Post: 05-23-2012, 07:03 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