"page of pages" for report groups

E

emanning

Sorry to rehash this again but I'm having problems with printing "page
x of y" pages for report groups. I copied the coding from
http://www.mvps.org/access/reports/rpt0013.htm and can see "page x of
y" for all groups but the total # of pages is not correct and
sometimes the starting page # is not correct. For instance, I have a
group that says there are 39 pages when actually there are 37. So the
very last page for this group says "Page 37 of 39". For some groups,
the first page # is not correct. For example, the first page of a
group might say "2 of 2" instead of "1 of 2".

I think I've done everything right as far as copying the coding to the
correct events and putting an unbound control in the page footer
section whose control source is "=[Pages]".

"Page" and "Pages" are not getting computed correctly for some
reason. Anyone else have this problem?

The very weird thing is if I limit the recordsource to one group, the
page numbering works fine for groups that have 5 or fewer records.
More than 5 and the total pages are not right again.

Thanks for any help or advice.
 
E

emanning

Sorry to rehash this again but I'm having problems with printing "page
x of y" pages for report groups.  I copied the coding fromhttp://www.mvps.org/access/reports/rpt0013.htmand can see "page x of
y" for all groups but the total # of pages is not correct and
sometimes the starting page # is not correct.  For instance, I have a
group that says there are 39 pages when actually there are 37.  So the
very last page for this group says "Page 37 of 39".  For some groups,
the first page # is not correct.  For example, the first page of a
group might say "2 of 2" instead of "1 of 2".

I think I've done everything right as far as copying the coding to the
correct events and putting an unbound control in the page footer
section whose control source is "=[Pages]".

"Page" and "Pages" are not getting computed correctly for some
reason.  Anyone else have this problem?

The very weird thing is if I limit the recordsource to one group, the
page numbering works fine for groups that have 5 or fewer records.
More than 5 and the total pages are not right again.

Thanks for any help or advice.

I believe I've found the answer. I have a subreport that I make
invisible on subsequent pages for a group. So if a group has 3 pages,
the subreport shows up only on the first page. I had the Can Shrink
property set to Yes. I changed that to No and the page numbering
works fine now. I guess it makes sense. Access goes thru and formats
the report like the subreport is always going to be there. Then when
the report is actually previewed, or printed, the subreport may or may
not be there. Can Shrink took away the white space that the
formatting included in the total number of pages.
 
A

Allen Browne

That's right.

Messing with code in the events of the report's sections so as to hide or
repeat records can give you weird page numbers. You may even see things
like:
Page 13 of 11

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.


emanning said:
Sorry to rehash this again but I'm having problems with printing "page
x of y" pages for report groups. I copied the coding
fromhttp://www.mvps.org/access/reports/rpt0013.htmand can see "page x of
y" for all groups but the total # of pages is not correct and
sometimes the starting page # is not correct. For instance, I have a
group that says there are 39 pages when actually there are 37. So the
very last page for this group says "Page 37 of 39". For some groups,
the first page # is not correct. For example, the first page of a
group might say "2 of 2" instead of "1 of 2".

I think I've done everything right as far as copying the coding to the
correct events and putting an unbound control in the page footer
section whose control source is "=[Pages]".

"Page" and "Pages" are not getting computed correctly for some
reason. Anyone else have this problem?

The very weird thing is if I limit the recordsource to one group, the
page numbering works fine for groups that have 5 or fewer records.
More than 5 and the total pages are not right again.

Thanks for any help or advice.

I believe I've found the answer. I have a subreport that I make
invisible on subsequent pages for a group. So if a group has 3 pages,
the subreport shows up only on the first page. I had the Can Shrink
property set to Yes. I changed that to No and the page numbering
works fine now. I guess it makes sense. Access goes thru and formats
the report like the subreport is always going to be there. Then when
the report is actually previewed, or printed, the subreport may or may
not be there. Can Shrink took away the white space that the
formatting included in the total number of pages.
 
M

Marshall Barton

emanning said:
Sorry to rehash this again but I'm having problems with printing "page
x of y" pages for report groups.  I copied the coding fromhttp://www.mvps.org/access/reports/rpt0013.htmand can see "page x of
y" for all groups but the total # of pages is not correct and
sometimes the starting page # is not correct.  For instance, I have a
group that says there are 39 pages when actually there are 37.  So the
very last page for this group says "Page 37 of 39".  For some groups,
the first page # is not correct.  For example, the first page of a
group might say "2 of 2" instead of "1 of 2".

I think I've done everything right as far as copying the coding to the
correct events and putting an unbound control in the page footer
section whose control source is "=[Pages]".

"Page" and "Pages" are not getting computed correctly for some
reason.  Anyone else have this problem?

The very weird thing is if I limit the recordsource to one group, the
page numbering works fine for groups that have 5 or fewer records.
More than 5 and the total pages are not right again.

Thanks for any help or advice.

I believe I've found the answer. I have a subreport that I make
invisible on subsequent pages for a group. So if a group has 3 pages,
the subreport shows up only on the first page. I had the Can Shrink
property set to Yes. I changed that to No and the page numbering
works fine now. I guess it makes sense. Access goes thru and formats
the report like the subreport is always going to be there. Then when
the report is actually previewed, or printed, the subreport may or may
not be there. Can Shrink took away the white space that the
formatting included in the total number of pages.


You need to fimd a way to make the subreport visible or not
that does not depend on the Pages property.

Depending on other unspecified factors like where the
subreport is located, you might be able to use a text box
(named txtDtlCnt) with control source expression =1 and
RunningSum set to Over Group. Then try using this to make
the subreport visible or not:
Me.thesubreport.Visible = (Me.txtDtlCnt=1)
 
E

emanning

emanning said:
Sorry to rehash this again but I'm having problems with printing "page
x of y" pages for report groups.  I copied the coding fromhttp://www..mvps.org/access/reports/rpt0013.htmandcan see "page x of
y" for all groups but the total # of pages is not correct and
sometimes the starting page # is not correct.  For instance, I have a
group that says there are 39 pages when actually there are 37.  So the
very last page for this group says "Page 37 of 39".  For some groups,
the first page # is not correct.  For example, the first page of a
group might say "2 of 2" instead of "1 of 2".
I think I've done everything right as far as copying the coding to the
correct events and putting an unbound control in the page footer
section whose control source is "=[Pages]".
"Page" and "Pages" are not getting computed correctly for some
reason.  Anyone else have this problem?
The very weird thing is if I limit the recordsource to one group, the
page numbering works fine for groups that have 5 or fewer records.
More than 5 and the total pages are not right again.
Thanks for any help or advice.
I believe I've found the answer.  I have a subreport that I make
invisible on subsequent pages for a group.  So if a group has 3 pages,
the subreport shows up only on the first page.  I had the Can Shrink
property set to Yes.  I changed that to No and the page numbering
works fine now.  I guess it makes sense.  Access goes thru and formats
the report like the subreport is always going to be there.  Then when
the report is actually previewed, or printed, the subreport may or may
not be there.  Can Shrink took away the white space that the
formatting included in the total number of pages.

You need to fimd a way to make the subreport visible or not
that does not depend on the Pages property.

Depending on other unspecified factors like where the
subreport is located, you might be able to use a text box
(named txtDtlCnt) with control source expression  =1 and
RunningSum set to Over Group.  Then try using this to make
the subreport visible or not:
        Me.thesubreport.Visible = (Me.txtDtlCnt=1)

Thanks Allen and Marsh.

I found a solution to making subforms invisible in this thread.
http://groups.google.com/group/micr...8f1?hl=en&lnk=gst&q=emanning#e0e295c3339288f1

Apparently, way back in 2004 I had this problem and posted a question
on this newsgroup. Works really well.

Funny I don't remember posting this question back then but then I
don't remember what happened yesterday! And who cares as long as it
works?
 

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