Batch Print Access Report to PDFs by Group?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misscrf
    New Member
    • Sep 2006
    • 13

    Batch Print Access Report to PDFs by Group?

    I have a report which is grouped in header and footer. Each report
    has the page break set on the group footer. Any way I can write code
    or a macro or something that will print my report to a directory as a PDF,
    printing each group to its own report, naming such report as it's
    header with the report name as a pre-fix?

    i.e.

    Report1

    GroupA
    detail
    GroupB
    detail
    GroupC
    detail


    = Output folder:
    Report1GroupA.p df
    Report1GroupB.p df
    Report1GroupC.p df


    Thanks!
  • Megalog
    Recognized Expert Contributor
    • Sep 2007
    • 378

    #2
    I've done something quite similar to this, except I used an easier approach.
    I have a crazy report that groups by people. To generate a pdf for each person that is in the report, I basically created a SELECT DISTINCT query that retrieves all the names of those who will show up in the report.. Using that, I create a vba loop that exports the report to pdf, using a different name as the report filter each time. By doing this, I was able to generate all the separate reports, as well as include the person's name in the pdf filename.

    Comment

    • misscrf
      New Member
      • Sep 2006
      • 13

      #3
      Thank you for responding. Would you please be able to share your information for how you created a loop? I know some VBA but I am a complete amatuer at loops. Loops and arrays are my big fears right now lol.

      Comment

      Working...