Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printing a report for each key record in a cursor
Message
From
15/10/2003 10:42:26
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00838874
Message ID:
00838883
Views:
19
>Can somebody help me please?
>
>I have a cursor with information by mainkey. I would like to print out a report for each mainkey in the cursor.
>
>
>SELECT crsfinal.mainkey, modacad.moc011 FROM crsfinal, modacad WHERE crsfinal.mainkey=modacad.mainkey ;
>INTO CURSOR crsmerged
>
>SCAN
>SELECT crsmerged
>REPORT FORM "c:\Foxpro Projects\Critical Path\ ;
>critical path.frx" NOEJECT NOCONSOLE TO PRINTER
>ENDSCAN
>
>
>This just prints out the first record in the cursor. How do I print out the report for EACH record in the cursor.
>
>Many Thanks
Neil

I would suggest you step through the cursor select out one record on each step into a seperate cursor. This cursor will only ever contain one record then drop that into the report.

I think scanning the cursor which conatins all the records will not work properly because the report may well reposition the the record pointer at eof causing you to only get one report. I'm sure you have good reason for wanting one report per record but why not just page break after each record ?

Nick Mason
Previous
Reply
Map
View

Click here to load this message in the networking platform