Subreport page numbers

A

anjee

Hello,

I have a report that includes a subreport in the Report Footer. The
subreport is simply a Page Break and a Textbox. The Textbox's
property is set to grow as this information can span multiple pages.

I need to be able to print the main report's Page Footer on the last
page of the main report ONLY, and then have the subreport print
thereafter.

I thought about retrieving the Pages number of the subreport and
subtract that value from the total number of pages but I cannot seem
to retrieve this value. The following always returns 0 when set as
the recordsource of a text box on the main report (note that txtPages
is set to [Pages]).
=[subreportchild].[Report]![txtPages]

Is there any way that I can accomplish this? Thanks for the help.
 
J

John Spencer

Subreports do not have any knowledge of pages. The paging and page
number is controlled by the main report.

You M I G H T be able to reset the page numbering by grabbing the page
number of the last detail printed from the main report and shoving that
into a variable and then using that to control page numbering and the
visibility of the page footer. I've never tried this idea, so it is up
to you to test it out.



'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================
 
A

anjee

Subreports do not have any knowledge of pages. The paging and page
number is controlled by the main report.

You M I G H T be able to reset the page numbering by grabbing the page
number of the last detail printed from the main report and shoving that
into a variable and then using that to control page numbering and the
visibility of the page footer. I've never tried this idea, so it is up
to you to test it out.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


I have a report that includes a subreport in the Report Footer. The
subreport is simply a Page Break and a Textbox. The Textbox's
property is set to grow as this information can span multiple pages.
I need to be able to print the main report's Page Footer on the last
page of the main report ONLY, and then have the subreport print
thereafter.
I thought about retrieving the Pages number of the subreport and
subtract that value from the total number of pages but I cannot seem
to retrieve this value. The following always returns 0 when set as
the recordsource of a text box on the main report (note that txtPages
is set to [Pages]).
=[subreportchild].[Report]![txtPages]
Is there any way that I can accomplish this? Thanks for the help.- Hide quoted text -

- Show quoted text -

Yes I did try to retrieve the page number from the format event of the
detail section, however [Pages] is set to the total report page number.
 
J

John Spencer

Not the pages property, the PAGE property. The problem I foresee here
is that the Page property will change as the section is repeatedly
printed so it would have to be trapped the first time the last record in
the detail section was formatted.

As I said this has a good chance of failing, but that is the first thing
I would attempt.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================

Subreports do not have any knowledge of pages. The paging and page
number is controlled by the main report.

You M I G H T be able to reset the page numbering by grabbing the page
number of the last detail printed from the main report and shoving that
into a variable and then using that to control page numbering and the
visibility of the page footer. I've never tried this idea, so it is up
to you to test it out.

'====================================================
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
'====================================================


Hello,
I have a report that includes a subreport in the Report Footer. The
subreport is simply a Page Break and a Textbox. The Textbox's
property is set to grow as this information can span multiple pages.
I need to be able to print the main report's Page Footer on the last
page of the main report ONLY, and then have the subreport print
thereafter.
I thought about retrieving the Pages number of the subreport and
subtract that value from the total number of pages but I cannot seem
to retrieve this value. The following always returns 0 when set as
the recordsource of a text box on the main report (note that txtPages
is set to [Pages]).
=[subreportchild].[Report]![txtPages]
Is there any way that I can accomplish this? Thanks for the help.- Hide quoted text -
- Show quoted text -

Yes I did try to retrieve the page number from the format event of the
detail section, however [Pages] is set to the total report page number.
 

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