Count of row numbers per each page of a report

D

DontKnow

Hi Guys,

I have a problem trying to get a report to display the number of rows per
page of a report. I can get the running total of a report from a thread that
Ihave read from this site but I am unable to produce a total of rows per each
page of a report. ie if the first opage has 13 rows and the 2nd page has 7
rows only, I am unable to display 13 on the 1st page and 7 on the 2nd page.
I am able to get 13 on the first and then 20 on the next page.

Has anyone done this type of thing before??

Please help me,

Cheers in advance
 
A

Allen Browne

There's a couple of ways to do this.

Take a look at:
Reports: Page Totals
agt:
http://allenbrowne.com/ser-11.html

It explains how to ceate a variable in the General Declarations section of
the report's module, reset it in the Page Headers' Format event, collect the
total (in your place the count) in the Detail section's Print event, and
assign the count to an unbound control in the Page Footer's Format event.

You could do essentially the same thing, adding 1 for each record (rather
than of the Amount field) to get the count.

You may find that you need to do more than than to get an accurate count if
the report's layout is complex, e.g. using its Retreat event as well.
 
D

DontKnow

Yes thanks Allen,

I think I have already used some of your code in a previuos thread that I
read. This code is a running sum of the count per page!!

I just want the number of rows per page not a running sum!!

Cheers

(Thanks in advance for your help Allen)
 
A

Allen Browne

If you add 1 for each record (rather than the amount), won't that give you
the count?
 
D

DontKnow

Sorry for ever doubting!

I just checked and found that I had eneterd the setting under the report
header and not the form header!!

All is good

Many thanks for your invaluable assistance Allen!!

Cheers
 

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