>I believe it is IMPOSSIBLE to print a single label with windows drivers! You can theoretically set the page length in the printer properties, but this seems to be a LOCAL parameter that gets blown away! Also makes very life difficult whenever you need to print a different form!
>
>just dumping control codes embedded in text to LPT1: or \\myprinter\oki if NOT using w98 seems to work best
That's why I've stopped using the LABEL function with dot matrix printing an instead create a report. First be sure the total height of the headers, footers and detail bands don't exceed the total height of one label.
The real trick is in handling the printer driver. If the printer only uses one kind of label stock, like just 3"x4" shipping labels, I'll edit the printer driver to a custom form size that matches the label size. Then I'll edit the report form with that custom printer driver as the default so the report form picks up the custom label size.
If the printer uses multiple form sizes, I'll create a report form for each label size and content, then hack the code in the report form by opening the report form with:
USE reportform.FRX
BROWSE
Edit field EXPR in record with OBJTYPE = 1, values PAPERLENGTH and PAPERWIDTH, which are in pixels. For more info refer to Jim Haentzschel's article "Rescue Your Reports from Printer-Specific Settings" in February 1999 issue of FoxPro Advisor, or MSKB#
Q133163.
-Henry-