Help! Report Detail Layout!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Good day.

I want to view/print only 25 records in every page of my
report. But I do not know how to do it. I tried
using .PrintSection, .MoveLayout but I did'nt get the
result I want. Report has a page footer.

Very much appreciated any help.
 
Just expand the height of your Detail Section on the report, until the
report yields 25 records per page you want.
OR...
You could adjust your Page Footer height to accomplish the same thing.
hth
Al Camp
 
Thanks. But spaces between records are also expanded.
If the report has page footer, would it be possible to
use the height or the space of the Page Footer for the
Detail Section (records are printed until it reaches the
margin)? I want my Page Footer appears only at the lower
bottom of the last page. I already tried Report Footer
but it is printed after the last record and not at the
bottom or at the footer of the page unlike page footer.
 
One way to control the number of records on a page is to
write a macro that checks the record count and inserts a
page break when it equals 25.

First, on your report:
1) Create a counting control -In the Detail section, add
a textbox control and enter =1 in it. Display the
properties for this control and rename it (change the
Name property) to something you'll remember, like
RecordCount.

Also, set the Running Sum property for the text box to
Over All and the Visible property to No.

2) Also, on the report in Design view, create a page
break control at the bottom of the Detail section. On the
Toolbox, click the Page Break button then click where you
want the break to be. Display the properties for this
control and rename it to something like Pbreak25.

3) Then, create a macro that checks the count of the
counter control (RecordCount) and inserts the page break
(PBreak25)when it = 25.

The macro would go something like this:
Open a new macro window.
In the Actions column, select SetValue from the dropdown
list in the first cell.

In the Arguments panel at the bottom of the window, in
the Item text box enter [Pbreak25].[Visible]

In the Expression text box, enter IIf([RecordCount] Mod
25=0,"True","False")

Save the macro and close it.

4)Open the report again in Design view and set the On
Format event to your macro. To do this, display the
properties for the entire report and display the Event
tab. Find the On Format text box and click in it. When
you open the resulting dropdown box, you should see the
name of the macro. Select it and then save the report.

Try the report in print preview to make sure all is well
then you can print it. (You might need to adjust the
Detail section or Page Footer section size if you don't
see all 25 of the records)

Chris
 
Good evening

Article Q119073 covers this subject - How to Print a Constant Number of Lines


Best Regards

Maurice St-Cyr
Micro Systems Consultants, Inc.
 
Back
Top