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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Restart Record Number on New Page

Status
Not open for further replies.

eric333

IS-IT--Management
Nov 3, 2007
76
US
I have a report where I have included the 'Record Number' special field in the Details section of the report. The recipient has asked that the record number be reset at the start of each page. Does anyone know how to accomplish this?
 
Are you looking for the report to display the number of records on that page?

If so try this

create a formula and place in page footer

global numbervar LastRecordCount;
global numbervar PageRecordCount;

if PageNumber=1 then
(
PageRecordCount:=RecordNumber;
LastRecordCount:=PagerecordCount;
)
else
(
PageRecordCount:=RecordNumber-LastRecordCount;
LastRecordCount:=recordnumber;
);

PageRecordCount;



 
Thanks for the tip, but I am not looking to display the number of records on a page. I am looking to display a line number on each line of each page, and have that number reset on each new page.
 
eric333:

In the Page Header:
@VariableReset_Counter:
whileprintingrecords;
Shared NumberVar Counter:=0;

In the Details Line:
@VariableSet_Counter:
whileprintingrecords;
Shared NumberVar Counter;
Counter:=Counter+1;
Counter;

Hope this helps! Cheers! [smile]

Mike
--------------------------
"To be alive is to revel in the moments, in the sunrise and the sunset, in the sudden and brief episodes of love and adventure, in the hours of companionship. It is, most of all, to never be paralyzed by your fears of a future that no one can foretell."
Author R.A. Salvatore via "Drizz't"
 
That worked perfectly. Thanks Mike!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top