>>>>
>>>>Path a textbox in your footer somewhere. For the report expression, call the UDF. The UDF sends the macro to the currentlyelected printer by the ???. The UDF returns a null string, resulting in nothing other than the macro being sent. You can use the TO PRINT clause to send output directly to the printer.
>>>>
>>>>>Marcus.
>>>
>>>One last question. I guess I should have said TO PRINT PROMPT NOCONSOLE. Do your reports have the driver screen come up before printing, or do you go straight to the printer. This seems to be my stumbling block. I can get it to work fine until I bring up the prompt (printer driver). It appears that the driver turns off the overlay macro, while not deleting it from memory.
>>>
>>
>>I don't use the PROMPT clause, because it's pointless to do so for our app - invoices and the like go to specific network print queues which are serviced by several printers (all of which have already been initialized with the macro set.
>>
>>More to the point, your problem is your reference to the macro. Realize that PCL is page-oriented; you don't need to 'turn on' an overlay macro and rely on it remaning active to print automagically, just fire it once for each page with &f
y3X. This way, different pages can reference different macro overlays (or no overlay).
>
>Okay, I lied. Thanks for the PCL tip. I appear to be doing exactly what you say, but here's what happens when I print a one page report (no prompt): A page with my overlay prints out, then a page with my data (no image) prints out. Any ideas why this might happen? You've been a tremendous help. Thanks again.
>
Yep, I know exactly what you're doing wrong, and it's in your macro. You've included a form feed in the macro itself at the end of the macro. You need to create your macro so that it saves the printer cursor position before the macro starts execution, adds the overlay, and then restores the printer cursor position without issuing a form feed - VFP will take care of the form feed issue. By saving the cursor position and restoring it, the macro can be executed almost anywhere on the page without interfering with the report form output.