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

How do I reset RecordNumber in the suceeding page/s? 1

Status
Not open for further replies.

crpaculan

Programmer
Jun 23, 2003
11
PH
Hello All,


I am printing details that requires the row count or record number to reset in the suceeding page/s.

I am trying to use arrays/and number variables, but I can't seem to get it.

The report format is somethis similar to the listing below:

Page 1 of 2

Employee Name Location Job Title

1 Anna Damian Wellington Analyst
2 Barry Black Wellington Asst. Super
3 Susan Holiday Wellington Supervisor
4 Sue Chen Lee Wellington Cust Serv

Page 2 of 2

Employee Name Location Job Title

1 George Lim Auckland Programmer
2 Crissa Jones Wellington Research Analyst
3 Lena Asis Wellington Channel Rep
4 Jacob Recelle Wellington Operator

Your help is greatly appreciate.

Thanks in advance.

Cristina.
 
You don't need arrays nor recordnumbers.

2 formulas should do it:

Page Header:
whileprintingrecords;
numvervar RowNumber := 0;

Details: (display this)
whileprintingrecords;
numvervar RowNumber := RowNumber +1;
RowNumber

-k
 
Thanks for the help.

I tried the code you gave, It works! But the succeeding pages are still incrementing.

How do I reset the next page to start to 1 again?

Cheers,

Cristina.
 

Hi,

I modified your suggestion, ang I got it. Thanks so very much.


Modifed to:

whileprintingrecords;

numbervar RowNumber := RowNumber +1;
if RowNumber = 21 then RowNumber := 1 else RowNumber


Cheers,

Cristina.
 
You should have had 2 formulas, one in the page header (which resets it), and one in the details.

What you did obviously works too, though you've hardcoded the number of rows to 20, so if a page does not have exactly 20, you'll have problems.

-k
 
Tested cases and you are absolutely right!

Thanks a million.

Cheers,

Cristina.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top