I have a government standard two page report. On the front page, a fairly elaborate header with some dynamic data, pulled from multiple resources. A single line (form number) for a footer.
I have a temporary table that just contains the basic information I need in order to find out how many records go into the main part of the report's front page, and the data I need in order to populate everything else (a series of DAO and Domain Lookups based on what's in the form used to open the report and the names in the temporary table). The temp table isn't an issue at all; the report's on-close event empties the entire table, and the form that opens it also populates it correctly. Never had any bugs with that.
I then use the "Me.Line" function to draw all the borders for the entire page, regardless of how many records contain data. This way it looks like the actual governmental form.
Basically, the first page looks and performs perfectly. The problem is, there is a back page too. And it's totally different.
If this report was always going to be only two pages, I'd be fine; inserting a Page Break control in the Report Footer allows me to do everything I want then. But if there are more than 21 names in the table, it needs a second "front page" and both front pages need a specific back page. On that page, it has dynamic data that is only as dynamic as the header on the front page. In the case of more than 21 records, I'd have "front page, front page, back page." The report could theoretically contain as many as 100 records, or 6 pages worth of "front pages."
I've learned how to turn the header (and footer) off, as well as to cancel the drawing of the lines that format the sheet on each even numbered page - programmatically, that was easy, but there is nowhere I can insert the controls or other data for a second page between each "front" page. I've tried adjusting positions of controls in the formatting events, but that's only going to change the formatting for the header and footer appropriately either; the size taken up by the Detail section repeated 21 times on the front page is the bulk for screen real estate.
Inserting a "Page Break" control into the page footer appears to have absolutely no effect, and even if it didn't, creating a page footer large enough for the second page doesn't allow me to print it either - I get the error that the size of the page is too big to display.
Is the solution going to be creating two subreports, each side by side, where the main report's width is the equivalent of two printable pages, and then going back into code and redrawing everything with an added qualifier (instead of "me.line" make the line me.subreport.line" and using the code to make sure it's only doing that on even numbered pages) still going to work? Or will the dynamically changing size of the detail section in that sub-report screw up the sizing of the second? Further, will the second page automatically print behind each first page? I don't want to try that (because it's a TON of work) if someone knows if it's going to fail, or that there is another, more elegant solution...
Other solutions "outside the box" would be nice. I've thought about exporting each page of the report to a PDF, but we don't have a distiller on each computer (this application has to be able to run on several hundred computers with their given licenses), so that isn't a real option either. On the other hand, if there is some sort of way to "export" the formatted page for printing to a PDF, and do a for loop that will append the second back page each time, I could automate that and then open the report in Acrobat. I'd need some example code if that's possible. But again, without a commercial distiller, I don't see that as a viable option.
Any suggestions?
I have a temporary table that just contains the basic information I need in order to find out how many records go into the main part of the report's front page, and the data I need in order to populate everything else (a series of DAO and Domain Lookups based on what's in the form used to open the report and the names in the temporary table). The temp table isn't an issue at all; the report's on-close event empties the entire table, and the form that opens it also populates it correctly. Never had any bugs with that.
I then use the "Me.Line" function to draw all the borders for the entire page, regardless of how many records contain data. This way it looks like the actual governmental form.
Basically, the first page looks and performs perfectly. The problem is, there is a back page too. And it's totally different.
If this report was always going to be only two pages, I'd be fine; inserting a Page Break control in the Report Footer allows me to do everything I want then. But if there are more than 21 names in the table, it needs a second "front page" and both front pages need a specific back page. On that page, it has dynamic data that is only as dynamic as the header on the front page. In the case of more than 21 records, I'd have "front page, front page, back page." The report could theoretically contain as many as 100 records, or 6 pages worth of "front pages."
I've learned how to turn the header (and footer) off, as well as to cancel the drawing of the lines that format the sheet on each even numbered page - programmatically, that was easy, but there is nowhere I can insert the controls or other data for a second page between each "front" page. I've tried adjusting positions of controls in the formatting events, but that's only going to change the formatting for the header and footer appropriately either; the size taken up by the Detail section repeated 21 times on the front page is the bulk for screen real estate.
Inserting a "Page Break" control into the page footer appears to have absolutely no effect, and even if it didn't, creating a page footer large enough for the second page doesn't allow me to print it either - I get the error that the size of the page is too big to display.
Is the solution going to be creating two subreports, each side by side, where the main report's width is the equivalent of two printable pages, and then going back into code and redrawing everything with an added qualifier (instead of "me.line" make the line me.subreport.line" and using the code to make sure it's only doing that on even numbered pages) still going to work? Or will the dynamically changing size of the detail section in that sub-report screw up the sizing of the second? Further, will the second page automatically print behind each first page? I don't want to try that (because it's a TON of work) if someone knows if it's going to fail, or that there is another, more elegant solution...
Other solutions "outside the box" would be nice. I've thought about exporting each page of the report to a PDF, but we don't have a distiller on each computer (this application has to be able to run on several hundred computers with their given licenses), so that isn't a real option either. On the other hand, if there is some sort of way to "export" the formatted page for printing to a PDF, and do a for loop that will append the second back page each time, I could automate that and then open the report in Acrobat. I'd need some example code if that's possible. But again, without a commercial distiller, I don't see that as a viable option.
Any suggestions?