If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Multiple report formats
I have several separate reports in various formats based on different tables
and queries and these reports are all related from the perspective of management users. How can I combine these reports into one report so that all are printed together, preferably with consecutive page numbers, titles, etc.? I can easily go through the report wizard and create each one but putting them together in this fashion is something I'm having trouble figuring out how to do. Thanks in advance -- Glenn |
#2
|
|||
|
|||
"Glenn Suggs" wrote in message
... I have several separate reports in various formats based on different tables and queries and these reports are all related from the perspective of management users. How can I combine these reports into one report so that all are printed together, preferably with consecutive page numbers, titles, etc.? I can easily go through the report wizard and create each one but putting them together in this fashion is something I'm having trouble figuring out how to do. One way... DoCmd.OpenReport "Report1" DoCmd.OpenReport "Report2" etc.. Now; create a public variable in a standard module and in the Page event of each page in all reports have a line of code... VariableName = VariableName + 1 In the Open event of all of the reports except for the first have a line of code... Me.Page = VariableName I'm not sure if I've listed the best events here but the point is that you can programmatically set the value for the [Page] property in a report and then it will count up from that as a new starting point. So if your first report had three pages the second report would number its first page as page 4 and so on. You would likely want an event in the first report to reset the variable back to zero in case you print the batch more than once in a session. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#3
|
|||
|
|||
Rick, Thanks for the input. It seems putting Me.Page = VariableName in the
open event doesn't set the first page number of each report but putting it in the Activate event does. However, the page number in that case are mixed up among the various reports. i.e... report 1 has pages 1, 2 report 2 has pages 2, 9 report 3 has page 3 report 4 has page 4 report 5 has pages 5, 7, 8 report 6 has page 6 It as if each report starts before the last one finishes, resets the page number, and then each continues with the next available sequence number. Can you help? -- Glenn "Rick Brandt" wrote: "Glenn Suggs" wrote in message ... I have several separate reports in various formats based on different tables and queries and these reports are all related from the perspective of management users. How can I combine these reports into one report so that all are printed together, preferably with consecutive page numbers, titles, etc.? I can easily go through the report wizard and create each one but putting them together in this fashion is something I'm having trouble figuring out how to do. One way... DoCmd.OpenReport "Report1" DoCmd.OpenReport "Report2" etc.. Now; create a public variable in a standard module and in the Page event of each page in all reports have a line of code... VariableName = VariableName + 1 In the Open event of all of the reports except for the first have a line of code... Me.Page = VariableName I'm not sure if I've listed the best events here but the point is that you can programmatically set the value for the [Page] property in a report and then it will count up from that as a new starting point. So if your first report had three pages the second report would number its first page as page 4 and so on. You would likely want an event in the first report to reset the variable back to zero in case you print the batch more than once in a session. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#4
|
|||
|
|||
"Glenn Suggs" wrote in message
... Rick, Thanks for the input. It seems putting Me.Page = VariableName in the open event doesn't set the first page number of each report but putting it in the Activate event does. However, the page number in that case are mixed up among the various reports. i.e... report 1 has pages 1, 2 report 2 has pages 2, 9 report 3 has page 3 report 4 has page 4 report 5 has pages 5, 7, 8 report 6 has page 6 It as if each report starts before the last one finishes, resets the page number, and then each continues with the next available sequence number. Can you help? You might have to use OpenReport only for the first report in your original code and then have each report open the next in its Close event. That should ensure that one is finished before the next one begins. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#5
|
|||
|
|||
When I open each report in the previous report's Close event, it works fine
as long as I run them in Preview mode. But when running in Print mode, acViewNormal, only the first one runs. Is the Close event supposed to fire when the a report is finished printing to the printer? It appears not. Thanks -- Glenn "Rick Brandt" wrote: "Glenn Suggs" wrote in message ... Rick, Thanks for the input. It seems putting Me.Page = VariableName in the open event doesn't set the first page number of each report but putting it in the Activate event does. However, the page number in that case are mixed up among the various reports. i.e... report 1 has pages 1, 2 report 2 has pages 2, 9 report 3 has page 3 report 4 has page 4 report 5 has pages 5, 7, 8 report 6 has page 6 It as if each report starts before the last one finishes, resets the page number, and then each continues with the next available sequence number. Can you help? You might have to use OpenReport only for the first report in your original code and then have each report open the next in its Close event. That should ensure that one is finished before the next one begins. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
#6
|
|||
|
|||
Glenn Suggs wrote:
When I open each report in the previous report's Close event, it works fine as long as I run them in Preview mode. But when running in Print mode, acViewNormal, only the first one runs. Is the Close event supposed to fire when the a report is finished printing to the printer? It appears not. Might have to experiment with different events. Try the OnPrint of the report footer. Even if the first report isn't "done" in that event it should at least be at its last page. -- I don't check the Email account attached to this message. Send instead to... RBrandt at Hunter dot com |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to run a report for multiple selections? | Amit | Setting Up & Running Reports | 0 | February 9th, 2005 07:25 PM |
Why is my report asking for my parameters multiple times? | BettyB | Setting Up & Running Reports | 1 | September 15th, 2004 06:14 PM |
Concatenating multiple values into a single field on a report | Kevin | Running & Setting Up Queries | 8 | July 16th, 2004 03:31 PM |