vcl-dxpscore-dot-tcustomdxcomponentprinter-f67b8e45.md
Specifies component printer behavior flags.
property Options: TdxCPOptions read; write; default DefaultOptions;
| Type | Default | Description |
|---|---|---|
| TdxCPOptions | DefaultOptions |
The set of flags that correspond to individual component printer behavior options.
|
Use the Options property to enable or disable specific component printer behavior options.
The Options property value can include any number of the following flags in any combination:
cpoAutoRebuildBeforePreviewThe component printer automatically rebuilds a report before it is displayed in the Print Preview window.cpoAutoRebuildBeforePrintThe component printer automatically rebuilds a report immediately before a print operation.cpoDropStorageModeAfterPreview
The Print Preview window can display a report imported from a file or stream.
If this flag is set, the active report link rebuilds a report from the source component when the Preview Window with an imported report is closed.
cpoGenerateReportProgressEvent
The component printer raises the OnGenerateReportProgress event during a report build operation.
You can handle this event to track the progress of a report build operation.
cpoShowHourGlassThe application shows the Windows wait cursor during time-consuming processes, such as a report build operation.cpoIgnoreInvalidPageMarginsBeforePrint
The component printer validates page margins before a print operation. If one or more page margins are outside the printable area according to the current printer settings, the component printer prompts a user to fix affected page margins.
If this flag is set, the component printer does not validate page margins before a print operation and displays no warning message.
Tip
You can set an individual report link‘s PrinterPage.IgnoreInvalidMarginsBeforePrint property to bFalse or bTrue to explicitly enable or disable page margin validation for the report link regardless of the cpoIgnoreInvalidPageMarginsBeforePrint flag.
The following code example disables page margin validation before a print operation:
dxComponentPrinter1.Options := dxComponentPrinter1.Options + [cpoIgnoreInvalidPageMarginsBeforePrint];
dxComponentPrinter1.Options = TdxCPOptions() << dxComponentPrinter1.DefaultOptions << cpoIgnoreInvalidPageMarginsBeforePrint;
The Options property’s default value is the DefaultOptions constant.
See Also
TdxPrinterPage.IgnoreInvalidMarginsBeforePrint Property
TCustomdxComponentPrinter Class