By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,154 Members | 2,405 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,154 IT Pros & Developers. It's quick & easy.

Report: incremental field and page break

P: n/a
I have to create a report, that contains in the section body a list of
record.
For every record it has to appear an incremental additional field that
begins from One; when he reaches the record 50, it is had to activate a page
break and the following record leaves again with numeration equal to one.

How can I do?
Dec 5 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Assuming you are not using Can Grow or Can Shrink, it's not too difficult to
design a page that prints 50 records per page.

Get your page height.
Subtract the Top and Bottom margins (File | Page Setup.)
Subtract the height of any Page Header and Page Footer.
Divide the result by 50
Set this as the Height of the Detail section.

To display the count, add a text box to the Detail section, with these
properties:
Control Source =1
Running Sum Over All
Format General Number
Visible No
Name txtCount
Now add another text box to show the count, and set its Control Souce to:
=(([txtCount] -1) Mod 50) + 1

If you have other complications (such as a Report Header or Group Headers),
you can add a Page Break control (from the toolbox) and programmatically set
its Visible property in the Format event of the Detail section, based on the
number of records so far on the page. You can use the counter described
above, or use a module-level variable that you increment in the Print event
of the Detail section, and reset in the Format event of the Page Header.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Daniele" <da*****@tiscalinet.itwrote in message
news:45*********************@news.tiscali.it...
>I have to create a report, that contains in the section body a list of
record.
For every record it has to appear an incremental additional field that
begins from One; when he reaches the record 50, it is had to activate a
page break and the following record leaves again with numeration equal to
one.

How can I do?

Dec 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.