Automate saving multiple pdfs from single report based on criteria

P

PierreRobert

Folks, I'm losing my mind: I know I have used before some relatively simple
module that, with just a little tweaking, allowed me to click a button,
launch a report, and name and save it into multiple, individual pdfs based on
a criterium. I'm pretty sure it was not Leban's work, and it might have been
referenced on an MS site.

I know this sounds like something I should be able to find, but I've now
searched for over two hours and can't for the life of me find it. There
seems to be a lot of complex solutions that are beyond me and not what I used
before. Any idea how I can accomplish this with not *too* much vba? The
solution I used before was pretty straightforward and elegant.
 
M

Mark Andrews

You could have been referring to our batch reporting module which we used to
sell. We just rolled that code into
our email module so it does both batch reporting and email templates.

http://www.rptsoftware.com/products/email/

See the section on batch reporting.

Alternatively you could write some code to loop through a recordset and call
the report with a where clause or
alternatively build query(s) on the fly before running each report (for more
complex senerios).
In Access 2007 you could use the built-in way to make pdf files. In Access
2003 and earlier you could use
Lebans pdf code or write code to set registry keys and print to a pdf
printer driver in the appropriate manner.


HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
 
P

PierreRobert via AccessMonster.com

Thank you. I realized I wasn't precise with my wording: I should have said
"based on a field", not "based on a criterium."
i've also come to the terrible realization that the code I was thinking of
was actually used in Excel to split a worksheet into seperate workbooks based
on cells in different groups. I imagine creating and saving separate PDFs
based on field will be a lot more challenging. Which of the suggestions below
do you think I will have the most luck using for my purposes?

Mark said:
You could have been referring to our batch reporting module which we used to
sell. We just rolled that code into
our email module so it does both batch reporting and email templates.

http://www.rptsoftware.com/products/email/

See the section on batch reporting.

Alternatively you could write some code to loop through a recordset and call
the report with a where clause or
alternatively build query(s) on the fly before running each report (for more
complex senerios).
In Access 2007 you could use the built-in way to make pdf files. In Access
2003 and earlier you could use
Lebans pdf code or write code to set registry keys and print to a pdf
printer driver in the appropriate manner.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
Folks, I'm losing my mind: I know I have used before some relatively
simple
[quoted text clipped - 11 lines]
before. Any idea how I can accomplish this with not *too* much vba? The
solution I used before was pretty straightforward and elegant.
 
M

Mark Andrews

Either using the product I mentioned or writing it yourself would both work.

When you say based on a field, I'm assumming you are just saying
- I have a lot of records in Access
- these records have one particular field that when the value in this field
is the same value I want all those records on the report
- I then want all of these possible reports to be made into pdf files

Loop thru recordset which best allows you to build the individual where
clauses for each report.
It's tough to give you specifics without knowing more details on the
project.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com

PierreRobert via AccessMonster.com said:
Thank you. I realized I wasn't precise with my wording: I should have said
"based on a field", not "based on a criterium."
i've also come to the terrible realization that the code I was thinking of
was actually used in Excel to split a worksheet into seperate workbooks
based
on cells in different groups. I imagine creating and saving separate PDFs
based on field will be a lot more challenging. Which of the suggestions
below
do you think I will have the most luck using for my purposes?

Mark said:
You could have been referring to our batch reporting module which we used
to
sell. We just rolled that code into
our email module so it does both batch reporting and email templates.

http://www.rptsoftware.com/products/email/

See the section on batch reporting.

Alternatively you could write some code to loop through a recordset and
call
the report with a where clause or
alternatively build query(s) on the fly before running each report (for
more
complex senerios).
In Access 2007 you could use the built-in way to make pdf files. In
Access
2003 and earlier you could use
Lebans pdf code or write code to set registry keys and print to a pdf
printer driver in the appropriate manner.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
Folks, I'm losing my mind: I know I have used before some relatively
simple
[quoted text clipped - 11 lines]
before. Any idea how I can accomplish this with not *too* much vba?
The
solution I used before was pretty straightforward and elegant.
 
P

PierreRobert via AccessMonster.com

Yes. I have thousands of records, and a field with a couple hundred unique
values--in this case, schools. I have reports that group the records based
on school. I run the report, create a pdf, then break the pdf into the
couple hundred of unique reports based on school. I do this for four reports.
That's a lot of time wasted making sure I break in the right place and
changing the file name.
I will look into looping through the recordset, which is similar to what I
did in excel, I believe, but I am still worried about integration with
Adobe/making PDFs.
Thanks again.

Mark said:
Either using the product I mentioned or writing it yourself would both work.

When you say based on a field, I'm assumming you are just saying
- I have a lot of records in Access
- these records have one particular field that when the value in this field
is the same value I want all those records on the report
- I then want all of these possible reports to be made into pdf files

Loop thru recordset which best allows you to build the individual where
clauses for each report.
It's tough to give you specifics without knowing more details on the
project.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
Thank you. I realized I wasn't precise with my wording: I should have said
"based on a field", not "based on a criterium."
[quoted text clipped - 39 lines]
 
M

Mark Andrews

Yes control the code so the report you run produces the pdf you want. In
this case a couple hundred pdf files.
Don't make one big pdf and then try and break that into many pdfs.

Access2003 and earlier most people use stephen lebans code to make the pdf
file
Access2007 pdf output is built-in
You can control some pdf print drivers via registry keys that can be coded
(a bit more work)

HTH,
Mark

PierreRobert via AccessMonster.com said:
Yes. I have thousands of records, and a field with a couple hundred
unique
values--in this case, schools. I have reports that group the records
based
on school. I run the report, create a pdf, then break the pdf into the
couple hundred of unique reports based on school. I do this for four
reports.
That's a lot of time wasted making sure I break in the right place and
changing the file name.
I will look into looping through the recordset, which is similar to what I
did in excel, I believe, but I am still worried about integration with
Adobe/making PDFs.
Thanks again.

Mark said:
Either using the product I mentioned or writing it yourself would both
work.

When you say based on a field, I'm assumming you are just saying
- I have a lot of records in Access
- these records have one particular field that when the value in this
field
is the same value I want all those records on the report
- I then want all of these possible reports to be made into pdf files

Loop thru recordset which best allows you to build the individual where
clauses for each report.
It's tough to give you specifics without knowing more details on the
project.

HTH,
Mark Andrews
RPT Software
http://www.rptsoftware.com
http://www.donationmanagementsoftware.com
Thank you. I realized I wasn't precise with my wording: I should have
said
"based on a field", not "based on a criterium."
[quoted text clipped - 39 lines]
The
solution I used before was pretty straightforward and elegant.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top