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

Page number not resetting correctly on report

Status
Not open for further replies.

BlackDice

Programmer
Mar 1, 2004
257
US
I have a report that may print for a few different companies at a time. I use the primary key as the basis for the Data Group. I've checked 'Restart page number to 1 for each group', except I keep getting "Page 1" twice. After that all the pages are incremented correctly. If I uncheck this, all the pages are ordered correctly, except not for each data group. So for two separate companies with two pages each with 'Reset to 1' checked I get:
(page numbers) 1,1,1,2
without it checked I get
1,2,3,4
and it should be 1,2,1,2

does anyone know what could be wrong? I'm using VFP 7

BlackDice

 
Is it possible that your cursor or table isn't ordered by the field you are grouping by?

boyd.gif

 
Do you have a title page on this report, or anything else that would be of interest in it... such as columns or functions that run when the report starts? The problem is that first page given what you've showed. VFP is assuming that the Group starts on physical page 2 for some reason (you probably already gathered that, I'm just thinking outloud). Is the record pointer at the top of the cursor when the report starts? Also, are you selecting the cursor just prior to running the report (Select "MyCursor")? Is the cursor related to any other table? Anything that could perhaps be causing the recordpointer to temporarily move in the table? Is the data that is displaying on the report exactly as you would expect, no missed records or records that have been duplicated?

boyd.gif

 
I made sure the cursor was selected, I did a "GO TOP". Everything seems to be intact in the cursor, and in the correct order. Just this pagenumber problem. The cursor is self-contained. There are no UDF's or anything out of the ordinary. I did place another data group on the report which is just based on Recno() to make sure no fields are orphaned by using the 'only print when this amount of space is left' option. I've been using that same format on other reports as well, with no problem. I even tried switching the groups around on the report, to no avail. I was also at work on Saturday, and I've been working on this problem for WAY too much time. BTW, check your e-mail.

BlackDice

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top