General information
Category:
Reports & Report designer
Title:
Report Form not using Cursor
Have a form that is used to print labels. Been using this form since FP 2.6. Used it successfullt in vfp7 and vfp 9. You can print the labels either in Name sequence or in Zip code sequence. In the current project it has a bad habit. It only prints in Zip code sequence regardless of which option you choose. After creating a temporary cursor called Dummy, the code performs a case statement to print to a file, preview, or printer. After coming back from CreateDummy() I Select Dummy. I checked and Dummy (at this point) contains the label data correctly. However a few statements later, the Report Form commands which follow are ignoring Dummy and printing or previewing data in Zip code sequence. Following is code from the OK button in the Labels Form.
There is no Grid on the form and I removed the table from the DE, to no avail.
What has me stumped is that this labels form works perfectly in another project using vfp 9.1.
In both instances the inputs are vfp9 free tables, they are however different tables. They both also have a canidate key.
All help appreciated.
Bill Wright
=thisform.createdummy()
SELECT dummy
GO TOP
DO CASE
CASE m.output = "To File"
to = m.filename
WAIT WINDOW "Processing Labels..." NOWAIT
LABEL FORM &labe ;
TO FILE &to ASCII NOCONSOLE
CASE m.output = "Preview"
thisform.setarrows()
REPORT FORM &labe ;
PREVIEW in screen
on key label leftarrow
on key label rightarrow
on key label uparrow
on key label dnarrow
CASE m.output = "To Print"
SET ESCAPE ON
ON ESCAPE DO thisform.stop_prt()
WAIT WINDOW "Printing Labels..." NOWAIT
IF glPrtSetup
REPORT FORM &labe ;
TO PRINTER PROMPT NOCONSOLE
ELSE
REPORT FORM &labe ;
TO PRINTER NOCONSOLE
ENDIF
SET ESCAPE ON
CLEAR TYPEAHEAD
ENDCASE
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only