Page X of Y accross 2 reports

F

Flintstone

I have 2 reports related to one another, one for cash and 1 for cheques
.... the headings are slightly different and they use a slightly
different select query.

I need to be able to run both reports but have Page X of Y continuing
in the second report.

So:
Report 1:
Page 1 of 8
Page 2 of 8
Page 3 of 8
Page 4 of 8
Page 5 of 8

Report 2:
Page 6 of 8
Page 7 of 8
Page 8 of 8

I have tried for almost a whole day and can not work out how this is
done ... does anybody know how to do it?
 
M

Marshall Barton

Flintstone said:
I have 2 reports related to one another, one for cash and 1 for cheques
... the headings are slightly different and they use a slightly
different select query.

I need to be able to run both reports but have Page X of Y continuing
in the second report.

So:
Report 1:
Page 1 of 8
Page 2 of 8
Page 3 of 8
Page 4 of 8
Page 5 of 8

Report 2:
Page 6 of 8
Page 7 of 8
Page 8 of 8

I have tried for almost a whole day and can not work out how this is
done ... does anybody know how to do it?


The first report would have to set its page number to a
global location (a text box on a form?):
Forms!someform.somtextbox = Me.Page
The second report can then retrieve it and set its page
number:
Me.Page = Forms!someform.somtextbox + 1

BUT, that is a very clumsy thing to do if there is a more
straightforward way. How about using one query that gets
both sets of records and use a Group on the cash/charge
field? If nothing else readily comes to mind, the least you
can do is UNION the two queries.
 
M

Marshall Barton

Flintstone said:
I have 2 reports related to one another, one for cash and 1 for cheques
... the headings are slightly different and they use a slightly
different select query.

I need to be able to run both reports but have Page X of Y continuing
in the second report.

So:
Report 1:
Page 1 of 8
Page 2 of 8
Page 3 of 8
Page 4 of 8
Page 5 of 8

Report 2:
Page 6 of 8
Page 7 of 8
Page 8 of 8

I have tried for almost a whole day and can not work out how this is
done ... does anybody know how to do it?


Whooops. I just did a double take at your question and
realized that you want the total number of pages on the
first report. This makes it much worse than I thought.
You would have to run the second report first to calculate
how many pages it will have, then run the first report to
calculate its number of pages before you run the second
report a second time with the right page numbers. Not
really a viable approach.

Give my alternate suggestions some serious thought.
 
J

John Spencer

Another option might be to use two sub-reports and let the main report take care
of the page numbering.
 
M

Marshall Barton

Excellent idea John!

I should have thought of that, but I was seriously
distracted when Bears intercepted a pass in their own end
zone ;-)
 
F

Flintstone

Thanks guys, that gives me some good ideas ... I think I will try with
the sub reports.
 
F

Flintstone

Actually, I have to alternate the coloring between records etc. and it
becomes very complex with sub reports.

Because I will have a maximum of around 20 records it looks like it is
simpler to just run a query to count the records.

So both responses were perfect.
 

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