|
      1) Using the rmmPrintSetupForm dialog.             a) properties.             b) methods.       2) Using the rmmPrintForm dialog.             a) properties.             b) methods.       2) Working with the printSet object.             a) properties.             b) methods.       How to questions.             a) How is a printSet object created ?             b) How is a stored que created ?             c) How is it used with a dBASE Report object ?             d) Where is the beef (real world) ?   |
| rmmPrintSetupForm Method | ||
| readModal | opens a dialog with settings that can be changed, saved, and applied to a printer. |
| Property | Default | ||
| devModes | assocArray | associates a devMode with a printer name. | |
| ok | false | did user select OK ? | |
| oPrintSet | printSet object | object to read and store printer settings and to apply properties when OK is selected. | |
| printer | _app.printer | object to read properties from and to apply properties to when OK is selected. |
| rmmPrintForm Method | ||
| readModal | opens a dialog with a que that can be changed and applied to a printer. |
| Property | Default | ||
| devModes | assocArray | associates a devMode with a printer name. | |
| ok | false | did user select Print ? | |
| oPrintSet | printSet object | object to read stored printer settings and to apply properties when Print is selected. | |
| printer | _app.printer | object to read properties from and to apply properties to when Print is selected. |
|
oRef = new printSet() example: oRef = new printSet() |
| printSet Method | ||
| close() | calls to release() and closes the printSet file. | |
| defaultPrinter() | returns the default Window's Printer name. | |
| enumPrinters() | returns a 1 column array of printer names. | |
| get(<char> property name) | returns a property value. | |
| getDevmode() | returns a string as a devMode structure. | |
| isOpen() | determine whether this object has been initialized. returns true/false (yes/no). | |
| isValidPrinter(<char> printer name) | determine whether the passed in printer name is valid. returns true/false (yes/no). | |
| open() | assign properties to this using either this.device or the defaultPrinter. returns true/false (success/fail). | |
| openQue([<char> que name]) | assign properties to this from a stored printer setting with the passed in que name or this.que. returns true/false (success/fail). | |
| release() | release object from memory. | |
| save() | store the current printer setting with this.que name. returns true/false (success/fail). | |
| saveQue([<char> que name]) | store the current printer setting to the passed in que name or this.que. returns true/false (success/fail). | |
| set(<char> property, <pValu> value) | set a property value, returns true/false (success/fail). | |
| setDevmode(<char> printer name, <string> devMode structure) | set this.device and the current devMode, returns true/false (success/fail). | |
| setPrinter(<object> printer object) | assign properties to a printer object, returns true/false (success/fail). | |
| showProps([<int> hwnd]) | display the Properties dialog for this.device. returns true/false (OK/Cancel). |
|
set procedure to printSet.co additive // Note: we are using printSet.co instead of printSet.cc // for compatibility with all 32 bit versions of dBASE. inspect(_app.printer) // notice a few of the property values. oPrintset = new printSet() if not oPrintset.openQue("Checks")   oPrintset.que  := "Checks"   oPrintset.open() endif if oPrintset.isOpen()   oPrintset.save()   oPrintset.setPrinter(_app.printer) endif oPrintset.close() // notice a few of _app.printer properties may have changed. // there are some additional properties as well. // You may need to toggle the tabs to refresh the inspector. // close the inspector. |
| printSet Property | Default | ||
| debug | false | whether to show msgbox error for get or set methods. | |
| device | "" | printer name | |
| left | 0.0000 | can be used for positioning a pageTemplate or a streamFrame | |
| que | "Default" | stored setting name | |
| top | 0.0000 | can be used for positioning a pageTemplate or a streamFrame | |
| version | "Release 1.xxxx" | version of printSet control. |
|
color <int> 0=Default, 1=Mono, 2=Color/Shades of gray. copies <int> 1 Number of prints to make. duplex <int> 0=Default, 1=None, 2=Duplex vertical, 3=Duplex horizontal. orientation <int> 0=Default, 1=Portrait, 2=Landscape. paperSize <int> Evaluates to a Width x Height paper size. paperSource <int> Evaluates to a paper tray or bin. printerName <char> Name displayed in the windows printer applet. printerSource <int> 0=Windows default, 1=dBASE default, 2=Specific Printer. resolution <int> 0=Default, 1=Draft, 2=Low, 3=Medium, 4=High. trueTypeFonts <int> 0=Default, 1=Bitmap, 2=Download, 3=Substitute, 4=Outline |
|
set procedure to rmmPrintSetup.wfm additive oForm = new rmmPrintSetupForm() _app.printer.que = "Reports" oForm.mdi := false oForm.readModal() close procedure rmmPrintSetup.wfm |
|
set procedure to rmmPrintSetup.wfm additive oForm = new rmmPrintSetupForm() _app.printer.que = "Checks" oForm.mdi := false oForm.readModal() close procedure rmmPrintSetup.wfm |
|
// Notes: // The que must be applied before issuing a report.render(). Local oPrintset, oReport set procedure to my.rep additive set procedure to printSet.co additive // Create report object. oReport = new myReport() // Redirect report output to the Printer. oReport.output := 1 // Either create a printSet object with the "Reports" que. oPrintset = new printSet() if oPrintset.openQue("Reports")   oPrintset.setPrinter(oReport.printer) endif // or create a printSet object with the "Checks" que. oPrintset = new printSet() if oPrintset.openQue("Checks")   oPrintset.setPrinter(oReport.printer) endif // Run the report. oReport.render() // Destroy objects. oPrintset.release() oPrintset  := null oReport.release() oReport  := null close procedure printSet.co close procedure my.rep |