Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
163
Добавлен:
11.05.2015
Размер:
4.73 Mб
Скачать

ReportOptions

Declaration

property ReportOptions : TCrpeReportOptions;

Type

TCrpeReportOptions = class(TPersistent)

Description

Only available with SCR 7.0 and higher. ReportOptions contains all the properties that reside in the "File | Report Options" dialog in Seagate Crystal Reports Designer. These are options which are specific to a particular Report. The ReportOptions object allows you to retrieve, modify, and send back the properties that belong to this class.

The CaseInsensitiveSQLData property specifies whether or not the SQL field names used in the Report will be treated with case-sensitivity or not.

The ConvertDateTimeType property specifies how DateTime fields will be treated in a Report: as DateTime values, as DateTime String values, or just as Date (no Time).

The ConvertNullFieldToDefault property specifies how Null field values will be treated in a Report: as they are (null), or as a default value (empty string for string fields, zero for numeric fields, etc.). If Null fields are not converted to default, extra care must be taken in Formulas and Selection Formulas to test for Null values, otherwise a null value can cause a formula to stop processing as soon as the null is encountered.

The CreateGroupTree property determines if the GroupTree panel on the Preview Window will be available or not.

The PrintEngineErrorMessages property determines if the Print Engine will put up it's own error dialogs, on top of the VCL's error handling. The built-in Print Engine error messages are often more descriptive than the standard error messages returned by the Print Engine to an application. It may be desirable to turn this option on when doing development, but it normally should be turned off when the application is finally deployed.

The SaveDataWithReport property determines if a Report will save the actual data used from the database with the Report when the Report is saved. Since saving is not possible at runtime, this property is not particularly useful at this time. It is possible to export a Report to RPT format, but the exported RPT will have Saved Data by default anyway.

The SaveSummariesWithReport property determines if the data calculated from summary fields in the Report is stored in the RPT file when the Report is saved. Since saving is not possible at run-time, this property is not particularly useful at this time. It is possible to export a Report to RPT format, but the exported RPT will have Saved Data by default anyway.

The TranslateDOSMemos property determines how dBase memo fields with upper ASCII characters are handled, whether they are translated to corresponding ANSI character values or not.

VCL Reference

87

The TranslateDOSStrings property determines how dBase string fields with upper ASCII characters are handled, whether they are translated to corresponding ANSI character values, or not.

The UseIndexForSpeed property specifies if an index or a SQL Server will be used to speed up processing of a Record Selection. Usually it is desirable to leave this option on, but it can cause problems with dBase indexes that use expressions or functions (which are not supported by Crystal's xBase driver).

The VerifyOnEveryPrint property determines whether the database structure will be re-read every time the Report runs. It is useful to have this option turned on during development, where database fieldtypes or lengths may change frequently. If the database structure is fixed, and will not change, this option can be turned off for slightly faster processing of the Report.

The ZoomMode property determines which zoom level the Report will first appear in within the Preview Window.

The PerformGroupingOnServer property specifies whether the grouping of data for a Report will take place on the Server or not. This option only applies to Reports based off an SQL or ODBC datasource.

The NoDataForHiddenObjects property determines whether data will be saved for parts of the Report that are in hidden sections.

The CopyFrom method can be used to store the ReportOptions settings to a temporary ReportOptions object.

The Retrieve method is used to retrieve the ReportOptions settings from a Report.

The Clear method can be used to set all the ReportOptions properties back to their default settings.

ReportOptions Example

This example sets the ReportOptions ZoomMode setting so that the Report will appear in the specified zoom when the Preview window appears:

Crpe1.ReportName := 'C:\Company.rpt';

Crpe1.ReportOptions.ZoomMode := pwWholePage;

Crpe1.Output := toWindow;

Crpe1.Execute;

ReportOptions Properties

ReportOptions CaseInsensitiveSQLData property, Page 515

ReportOptions ConvertDateTimeType property, Page 516

ReportOptions ConvertNullFieldToDefault property, Page 516

ReportOptions CreateGroupTree property, Page 517

ReportOptions NoDataForHiddenObjects property, Page 517

ReportOptions PerformGroupingOnServer property, Page 518

ReportOptions PrintEngineErrorMessages property, Page 519

VCL Reference

88

Соседние файлы в папке crystal