Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting a blank label at the end of a report
Message
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00821138
Message ID:
00821174
Views:
22
This message has been marked as the solution to the initial question of the thread.
What happens if you shorten your code to this:
IF NOT FILE("C:\WHS_PC.ID")
    MESSAGEBOX("Your PC is not set up to print inventory tags", 0, "Print Error")
    RETURN
ENDIF

*** set up the device
SET PRINTER TO NAME "Zebra TLP2844"

*** print the label using the report writer
LABEL FORM 'i:\item_tag.lbx' FOR RPT_NUMB = mRPT_NUMB ;
  NOCONSOLE TO PRINTER PROMPT

RETURN
>Hi all,
>
>I searched the archives and only found one thread concerning this problem. On a form I have a print button to print inventory tags for the receiving report on screen. At the end of the print job I am getting one totally blank label. The *.lbx uses only the detail band.
>
>Here is the code in the print button click event.
>
>PROCEDURE print_tag &&----------------------------------------------
>*** print inventory tags with barcode, client, sidemark, indate, and description
>*** using a Zebra 2844 printer with 4 x 3 inch labels. Windows print drivers
>
>*** only print if this PC has a label printer
>IF NOT FILE("C:\WHS_PC.ID")
>    MESSAGEBOX("Your PC is not set up to print inventory tags", 0, "Print Error")
>    RETURN
>ENDIF
>*** set up the device
>SET PRINTER TO NAME "Zebra TLP2844"
>SET DEVICE TO PRINTER PROMPT
>SET DEVICE TO PRINT
>SET PRINT ON
>SET CONSOLE OFF
>*** print the label using the report writer
>LABEL FORM 'i:\item_tag.lbx' FOR RPT_NUMB = mRPT_NUMB
>SET DEVICE TO SCREEN
>SET PRINT OFF
>SET CONSOLE ON
>SET PRINTER TO
>RETURN
>
>I've made sure that the detail band fits the label (preview tells you so), and that the footer band is tight to the last textbox in the detail. In the IDE I do not get the blank label. Rearranging the various concoctions of 'SET' will give me the blank label at the beginning of the print job.
>
>Any ideas? This is driving me crazy. It wouldn't be so bad if all the print jobs were huge, but many of them are just one item. Too much waste.
Cathy Pountney, Microsoft Visual FoxPro MVP
Memorial Business Systems, Inc. (www.mbs-intl.com)

My Website: (www.frontier2000.com)
My Blog: (www.cathypountney.blogspot.com)
My Book: The Visual FoxPro Report Writer - Pushing it to the Limit and Beyond
Free MSDN Article: What's New in the VFP 9.0 Report Writer
Free MSDN Article: The VFP 9.0 Report Writer In Action
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform