Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit detail rows in report page 1

Status
Not open for further replies.

HHaskel

Programmer
Jun 14, 2002
46
SE
How can I limit the number of detail rows at each page to max 30 in my report?

The reason for this is to make my report have the same page breakes independent of what printer I have selected.

I have an idea that I could in some way send a pagebreake after 30 rows but I don't know how to do that, or is there a better way to do it?


Hakan Haskel
 
You basic idea is correct. Add a pagebreak to the Detail section. The add a textbox. In the Control Source put
=1
set the Running Sum property to
Over All
and set the visible property of the textbox to
No

Then put this code in the Format Event for the Detail section

If TextboxName Mod 30 = 0 Then
PagebreakName.Visible = True
Else
PagebreakName.Visible = False
End If

Adjust the TextboxName and PagebreakName to your values. That should do it.

Paul
 
Thanks Paul

I have not tested it yet, but it seems to be the perfect solution.


Hakan Haskel
 
Now I have tested

Works perfect.


Thank again
Hakan Haskel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top