Sequentially print multiple tables/queries in single report

A

AJCrowley

I used to work with Access a lot, but it was a long time ago, and I'm having
a hard time working out how to do what should be a fairly simple task.

I want to create a report, with a similar structure to this:

Intro Page
-break-
Table of contents
-break-
table 1, 1 record per page (along with single field list of related records
from table 2)
-break-
table 2, 1 record per page

I've grown so used to scripting, that my instinct is just to use VBA to query
the tables and build the reports programatically, which makes perfect sense
to me, and since the records from the tables are one per page, so long as I
can calculate the length of my TOC, it should be a fairly trivial matter.

However, my problem is that apparently you can't add controls to a report
programatically.

The next thing I thought to try was using subreports. Problem is, page breaks
on subreports are ignored, so I can't force the one record per page rule,
which is a requirement. So this method isn't a great deal of use to me.

The final thing I thought to try was a UNION query, but one table has 10
fields, and one has 44. While I can just pad out the smaller table with dummy
expressions, it seems messy, plus that's a lot of controls to work out how to
rearrange and hide. It just doesn't seem like a practical solution.

Is there a sensible way to do this, or am I going to have to look to a third
party reporting solution?

Thanks for any help,

AJ
 
C

Chuck

I used to work with Access a lot, but it was a long time ago, and I'm having
a hard time working out how to do what should be a fairly simple task.

I want to create a report, with a similar structure to this:

Intro Page
-break-
Table of contents
-break-
table 1, 1 record per page (along with single field list of related records
from table 2)
-break-
table 2, 1 record per page

I've grown so used to scripting, that my instinct is just to use VBA to query
the tables and build the reports programatically, which makes perfect sense
to me, and since the records from the tables are one per page, so long as I
can calculate the length of my TOC, it should be a fairly trivial matter.

However, my problem is that apparently you can't add controls to a report
programatically.

The next thing I thought to try was using subreports. Problem is, page breaks
on subreports are ignored, so I can't force the one record per page rule,
which is a requirement. So this method isn't a great deal of use to me.

The final thing I thought to try was a UNION query, but one table has 10
fields, and one has 44. While I can just pad out the smaller table with dummy
expressions, it seems messy, plus that's a lot of controls to work out how to
rearrange and hide. It just doesn't seem like a practical solution.

Is there a sensible way to do this, or am I going to have to look to a third
party reporting solution?

Thanks for any help,

AJ

Brute force, no fineness, no elegance: Make four separate reports,
Information, Table of contents, Table 1, Table2. Make sure the individual
reports run and print the way you want then to look. Make a fifth report that
has only a detail section. Drag your information report the top of the detail
section of the fifth report. Set height of info report to something small
(maybe quarter inch). Set can grow to yes. Insert page break just under info
report. Repeat for next three reports. Print fifth report.

Chuck
 

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