Multiple subreports

F

frank777

Hello all,

I have a table with 7 records in it. Each record contains the name of a
report and a date range. I have a second table with hundreds of
records.
From these two tables I want to print 7 reports: one for each record of
the first table. Each of these reports will be identical with the sole
exceptions of:

1. The name of the report (which will be taken from the first table).

2. Which records from the second table appear on the report. Each
report will show whichever records fall in the date range specified in
the first table. Note that there will be overlapping date ranges - i.e.
many records from the second table will show in multiple reports.

What is the best way to create a report so that everytime that report
is run, all seven reports are produced? I have been thinking that the
best way would be to make my report a subreport and then include it on
the main report. But when I do this I run into two problems:

1. I have code in the Report_Open event of the subreport to take the
report type (1 of 7) and use that to fetch the date range and set the
title. However, I've discovered that this event only fires once. I
would have expected it would fire each time the subreport was opened
(i.e. 7 times).

2. The headers and footers for the subreport are acting oddly.

Sorry if this is unclear. Basically what I'm doing is trying to
generate 7 reports of identical format but different records with one
push of a button.

Thanks in advance.

James
 

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