*-- Execute this code to create *-- an empty resource file SET RESOURCE OFF USE SET('RESOURCE',1) COPY TO PrntUser USE Junk EXCLUSIVE ZAP USE SET RESOURCE TO PrntUserNow that this resource file is active, preview a report and dock the toolbar where you want it. When done, do the following.
SET RESOURCE TONow mark the file as read-only and include it in your application. When you want to run a report, do it as follows:
* Set the resource file to the special printer resource file LOCAL lcResourceTo, lcResourceOnOff lcResourceOnOff = SET('RESOURCE') lcResourceTo = SET('RESOURCE',1) SET Resource TO PrntUser * Print the report REPORT FORM MyReport PREVIEW IF WEXIST('Print Preview') RELEASE WINDOWS 'Print Preview' ENDIF * Restore the resource file IF EMPTY(lcResourceTo) SET Resource TO ELSE SET Resource TO (lcResourceTo) ENDIF SET Resource &lcResourceOnOff