I have a form with a Command Button. The button has an On Click event procedure that opens a form and prints it. Two questions:
1) Is it possible to include code that will select a certain printer for the output? We often use this report in PDF format to e-mail to other offices and it would be nice if I could find a way to designate the printer as acrobat distiller when the button is clicked.
2) Is it possible to include code that changes the caption of the report to include text from a control on the form? The reports are cost summaries of projects. The form selects the project and the report prints the results. It would be nice if I could find a way to code it so that the project number, which is one of the controls on the form, is included in the report's caption. When the report is printed to acrobat distiller, the caption is used as the default filename.
changing the caption fo the report can be done. If you only call this report from the form then, suggest you put some code in the reports onopen / on load event
the precise wording may be different (it could be report.title/me.title)
but this should point you in the right area.
As to specifying printers, I'll let someone else comment on that
This put both the project number (from a combo box on my form) and the text "HrsByActivity" as my report's caption. Therefor, when I save the Adobe PDF file generated by printing this report, the filename is [ProjectNumber]HrsByActivity (e.g. 04E-7005HrsByActivity).
Now if only I could find a way to have access merge pdf documents. I generate 5 separate reports for each project, and a single PDF file would be a big bonus! Any ideas?
option 1) would be trofold those reports into one new report. If you need to keep the option of generating individual reports aswell then you may need to consider cloning the report (nasty as it then means you, or you successor, have to apply any changes in one report to another report). If not then create a new report, insert the pre-exisiting reports as sub reports, with a form feed between each sub-report. You will probably need to set each sub reports "cangrow" property to true.
Not certain if this will work, I'm still brain dead from last nights session
He used the word "separate" so I'm assuming each report needs to be on an individual page. There would almost have to be a page break (Force New Page) after each subreport. If not, you'd get a grouping effect...
You two have sure been helpful, thank you. I have now created a new report that consists of all of the reports I needed combined as subreports. This seems to work beautifully, with a few glitches. I have been able to get the pages to break where I want them to, hurah for that. However, some of my reports have multiple pages and I can't seem to find a way to have any of the headers repeat on subsequent pages. If I put the header info in the report or page header of the subform, it doesn't show up at all. If I put it on a group header in the subform, it shows up on the first page but not on any of the pages that follow. Any idea how I can have a unique header for each of these subreports that will repeat on every page that the subreport is on?
Again, thank you for your help. You have saved my headache for another day.