Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Overlaying an insurance form onto a laser printed report
Message
From
23/07/1998 04:12:16
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00112699
Message ID:
00120346
Views:
31
>>>Can you use this overlay with the report designer? I can't figure out how to get the image to automatically overlay when I print with the driver (REPORT FORM...TO PRINT) without going into the driver advanced settings and explicitly telling it to insert a macro. So far all the messages I've seen regarding this subject bypass the driver for their printing. Anyone using the report designer with a macro overlay?? Thanks for any feedback.
>>>
>>
>>Yep - I explicitly put a call to a UDF that outputs the macro via ??? in the page footer.
>
>Thanks Ed. Would you mind a little more detail. Do you call it from the "run expression on enter" or "run expression on exit" or some other place in the footer. Does your UDF just set the macro active or do you actually copy to the printer from the UDF? Thanks again.

I copy the macro to the printer as a permanent macro before the application starts, so that all the macros that I might reference are present before I need them; typically, we have a batch job that runs once a day to copy the files containing the permanent macros to the printers involved, and that need only be run after the printers are turned off and back on.

The UDF is in the page footer; it accepts a parameter that identifies the macro we want run (typically, the macro id is based on a company number, since we use the macros to overlay company-specific invoice formats.) The UDF returns a null string to the report form, but sends the following using '???':

CHR(27)+'&f'+_macroid+'y3X'

This sends y3X to trigger the permanent macro. Our macro id is a 3 byte character expression, typically, something like '1'+company # for invoice layout, '2'+company # for credit memo layout, etc.

hth,

Ed
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform