Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2003
    Posts
    300

    Exclamation Unanswered: How to create pdf for each report break?

    Basically I have a report with 20 page breaks, ie grouped on a certain data element..

    when I run the report, I want to create 20 separate PDF files...

    how can I do this?

  2. #2
    Join Date
    Mar 2009
    Posts
    5,442
    Provided Answers: 14
    Can't you open the report with a filter or a criteria for each data element?
    Have a nice day!

  3. #3
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    You can use the technique here to filter the report, along with the loop:

    Emailing a different report to each recipient

    but creating PDF's instead of emailing.
    Paul

  4. #4
    Join Date
    Nov 2003
    Posts
    300

    Automate distribution of Report to PdF to e-mail

    There has got to be a better way to achieve this.. There is an open report and Sendobject in the MACRO action/commands that does almost everything that I need, however , I cannot get it to make the record selection that i have setup for the report criteria..

    how can I get it to send a separate e-mail for each report selection criteria?

  5. #5
    Join Date
    Nov 2003
    Posts
    300

    Question

    Let me try this again. I have a single report with 20 page breaks in it. I want to produce 20 PDFs on each page break. I can already create a PDF for the entire report.


  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    Let me try again. There is no provision in SendObject to restrict the report to a given set of records. If you don't want to use the method I posted above to restrict the report, another option is to open the report using the wherecondition argument of OpenReport, then send it. That of course means 3 lines of code per, instead of 1, using a much less efficient method. You still need to loop through the grouped values to do it once per value. That takes you out of the macro realm and into VBA.
    Paul

  7. #7
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by databasemon View Post
    Let me try this again. I have a single report with 20 page breaks in it. I want to produce 20 PDFs on each page break. I can already create a PDF for the entire report.

    I agree with Paul recommendation. It is the simplest method.

    You will need to run the same report 20 times, each time filtering the report print a single grouping.

    I have also used VBA code to modify the QyeryDef() for the report's query. This is done is a loop that will modify the QueryDef() 20 times in your case. This does require a lot more VBA code.
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •