Print Report to PDF by Group _ Name by Group?

M

misscrf

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,
printing each group to its own report, naming such report as it's
header with the report name as a pre-fix?

Thanks!

i.e.

Report1

GroupA
detail
GroupB
detail
GroupC
detail

= Output folder:
Report1GroupA.pdf
Report1GroupB.pdf
Report1GroupC.pdf
 
T

Tony Toews [MVP]

misscrf said:
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,
printing each group to its own report, naming such report as it's
header with the report name as a pre-fix?

You need to create a query which has one record for each group of data
you want to print.

Then see the Sample Code illustrating looping through a DAO recordset
page at the Access Email FAQ at
http://www.granite.ab.ca/access/email/recordsetloop.htm

Presumably you want to create that report as a PDF file. Creating
PDF files from within Microsoft Access
http://www.granite.ab.ca/access/pdffiles.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

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