QuickReport 3.6 Release Candidate
Release date : August 2002//OnGetPrintersettings is fired twice - first BEFORE the printer //values are placed in the DevMode ( the user can cancel this ), and //a second time AFTER the printer values are placed in DevMode. This //allows the values to be interrogated. procedure TRepForm.QuickRep1GetPrinterSettings(Sender: TObject; var Cancel: Boolean; DevMode: Pointer); begin // cancels the GetPrinterSettings - the printer settings are // NOT written into the PrinterSettings structure cancel := true; end; // OnApplyPrinterSettings is fired once, after the design values have // been placed in DevMode, but before the DevMode is given to the // printer. The user may change values in DevMode or cancel the // operation. procedure TRepForm.QuickRep1ApplyPrinterSettings(Sender: TObject; var Cancel: Boolean; DevMode: Pointer); var cdevmode : PDeviceMode;// not necessary but used for explicitness begin // this code is not concise but pedagogical // forces the printer to do 2 copies( assuming it is supported) cdevmode := PDeviceMode( DevMode); cdevmode.dmCopies := 2; end;
for details of the DevMode structure see 'vcl\source\printers.pas'.
Export controls (GrControls )
With the exception of the TQRGrDBImage, the controls in the QRExports package are not required because the standard QuickReport controls now export to HTML and PDF. The QRGrDBImage is not obsolete because it has better stretching modes then TQRDBImage. All the controls are still available for compatibility with existing reports.
New printer setup options
UseStandardPrinter
disables QR's internal printer setup and allows the standard Delphi printer setup to be used. Default is 'False'.
UseCustomBinCode
overrides the internal output bin selection codes. Default is 'False'.
CustomBinCode
the integer value that will be sent to the printer for bin selection
UseCustomPaperCode
overrides the internal paper selection codes. Default is 'False'.
CustomPaperCode
the integer value that will be sent to the printer for paper selection
ExtendedDuplex
is of integer type, allowing a wide range of codes to be used. The recognised Delphi constants only have 3 values, which will soon need extension, so this property has been left open. It is your responsibility now to ensure that a proper code is used. Any value other than 0 (ZERO) will override the Duplex setting.
The values defined in the Delphi VCL (windows.pas) are -
{ duplex enable } {$EXTERNALSYM DMDUP_SIMPLEX} DMDUP_SIMPLEX = 1; {$EXTERNALSYM DMDUP_VERTICAL} DMDUP_VERTICAL = 2; {$EXTERNALSYM DMDUP_HORIZONTAL} DMDUP_HORIZONTAL = 3;