Varying the report caption/pdf file name based on "Where Condition" parameter

R

RoryD

I have a macro that runs the same report 30 times, and uses a "Where
Condition" ([County_Name]="Cork", [County_Name]="Dublin", etc.) to specify a
differenty county filter for each report. The report is set to print to
PDF, and I want to print each report to a different report caption/pdf file
name that includes the county from the "Where Condition". Currently every
report prompts with just "Monthly Sales.pdf" because that is what the Report
Format Caption specifies. I want to append the county name to each Caption,
e.g.

"Monthly Sales - Cork.pdf"
"Monthly Sales - Dublin.pdf"
etc...

Any ideas how I can achieve this?

TIA,

RoryD.
 
A

Allen Browne

Rory, someone else may have a better suggestion for you, but IIRC the PDF
defaults to the report's saved caption name.

You can set the Caption in the report's Open event and that works on screen
but does not change the name the PDF uses.
 

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