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

Record pointer is changed when Report Form command executes

Status
Not open for further replies.

diem

Programmer
Jul 25, 2001
28
0
0
US
Hi everyone,

I'm trying to do a report for each record in the table and the record pointer keeps pointing to the beginning of the table when the Report Form command executes. For example, if the table has 5 records, then it will loop through each record and print out a report for that record. The first record seems ok and data for the first record are correct. But when the next record is pointed to and ready for the report, the record pointer is pointed back to the beginning of the table and it gets data from the first record. It seems to happen on the Report Form command line. When I browse the table before this Report Form command line, the record pointer is still pointing to correct record. Does anyone know how to fix this problem? Do I have to Set something to fix it? Thank you very much
 
You probably have no condition FOR by report.
You may try e.g. FOR recno() = 1 ,etc.
 
tesar is right,
if you issue a report form, it will report from the beginning to the end of the table/cursor.

It is the same as an SCAN ENDSCAN statement as well as with more VFP statements.

You will have to issue a FOR clause to tell the report what to print.

HTH,
Weedz (Wietze Veld)
My private project:And especially for VFP rookies:
 
Hi everyone,

Thank you for all your help. The tips really helped fixing my report problem. I appreciate it.

Thanks
 
I don't know if this is a visual foxpro report, but if it is you may want to edit the report and be certain that you don't have the table opened in the data environment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top