Printing several report as one

  • Thread starter Thread starter kerri
  • Start date Start date
K

kerri

Is there any way I can have several reports appear as one?

I have tried including a report as a sub report of
another, although as they are not sharing data, the sub
report is blank.

Obviously page numbering etc would be consistent
throughout....

Thanks in advance, kerri
 
Is there any way I can have several reports appear as one?

I have tried including a report as a sub report of
another, although as they are not sharing data, the sub
report is blank.

Obviously page numbering etc would be consistent
throughout....

Thanks in advance, kerri

Just run the reports separately, one after the other.
You can do this using code in an event, or manually.

If it's the page numbering that is creating a problem for you, you can
use this following method to consecutively number all the reports.
Note: You cannot use [Pages] (the "Page 1 of 8" type of numbering), as
the first reports have no way of knowing in advance the total number
of pages in all the reports.

Make a table to hold the last page number of each report.
Table name "tblPage"
All you need is one field:
"intPageNumber" Number datatype, Integer

Next, enter a 0 (Zero) into the field as a starter number.

Now in each report, Dim a variable in the declarations section:

Option Compare Database
Option Explicit
Dim intLastPage as Integer

Code each report's Open event:
intLastPage = DLookUp("[intPageNumber]","tblPage")

Code each Report's Report Header Format event:
[Page] = [Page] + intLastPage

Code each Report's Report Footer Print event:
DoCmd.SetWarnings False
DoCmd.RunSQL "Update tblPage Set tblPage.intPageNumber = " & [Page] &
";"
Docmd.SetWarnings True

Each report should pick up the ending page of the previous report and
increment it by 1.
Note: You'll not be able to use the [Pages] property in any of these
reports, i.e. ="Page " & [Page] & " of " & [Pages] as you'll get
something like "Page 32 of 4".

You must enter a 0 in the table at the START of each batch of reports.
If there is always one same report which is run first in the batch,
just use a RunSQL in the first Report's Open event (before anything
else):

DoCmd.SetWarnings False
DoCmd.RunSQL "Update tblPage Set tblPage.intPageNumber = 0;"
Docmd.SetWarnings True

to reset the field to zero.

If the Reports are in random run order, manually enter a 0 into that
table field manually before starting.
 
kerri said:
Is there any way I can have several reports appear as one?

I have tried including a report as a sub report of
another, although as they are not sharing data, the sub
report is blank.

Obviously page numbering etc would be consistent
throughout....


Use an unbound main report with all of your reports as
subreports.

Since subreports are unaware of paging activities, use the
main report's Page header/footer for the page numbers,etc.
 
Back
Top