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

Description

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.

Example

This example sets the SaveDataWithReport property of ReportOptions:

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

{Save Data for Subreports, etc. in hidden sections} Crpe1.ReportOptions.NoDataForHiddenObjects := cFalse;

{This next one is just a formality: all exported RPT have Saved Data} Crpe1.ReportOptions.SaveDataWithReport := cTrue;

{Save Summaries also: optional} Crpe1.ReportOptions.SaveSummariesWithReport := cTrue; Crpe1.Output := toExport;

Crpe1.Export.Destination := toFile; Crpe1.Export.FileType := CrystalReportRPT; Crpe1.Export.FileName := 'C:\SavedData.rpt'; Crpe1.Execute;

ReportOptions SaveSummariesWithReport property

Declaration

property SaveSummariesWithReport: TCrBoolean;

Type

TCrBoolean = (cFalse, cTrue, cDefault);

Description

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 directly possible at runtime, this property is only useful when a Report is exported to RPT format.

VCL Reference

520

Example

This example sets the SaveSummariesWithReport property of ReportOptions:

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

{Save Data for Subreports, etc. in hidden sections} Crpe1.ReportOptions.NoDataForHiddenObjects := cFalse;

{This next one is just a formality: all exported RPT have Saved Data} Crpe1.ReportOptions.SaveDataWithReport := cTrue;

{Save Data calculated in Summaries} Crpe1.ReportOptions.SaveSummariesWithReport := cTrue; Crpe1.Output := toExport;

Crpe1.Export.Destination := toFile; Crpe1.Export.FileType := CrystalReportRPT; Crpe1.Export.FileName := 'C:\SavedData.rpt'; Crpe1.Execute;

ReportOptions TranslateDOSMemos property

Declaration

property TranslateDOSMemos: TCrBoolean;

Type

TCrBoolean = (cFalse, cTrue, cDefault);

Description

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.

Example

This example sets the TranslateDOSMemos property of ReportOptions:

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

Crpe1.ReportOptions.TranslateDOSMemos := cTrue;

Crpe1.Output := toWindow;

Crpe1.Execute;

VCL Reference

521

ReportOptions TranslateDOSStrings property

Declaration

property TranslateDOSStrings: TCrBoolean;

Type

TCrBoolean = (cFalse, cTrue, cDefault);

Description

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.

Example

This example sets the TranslateDOSStrings property of ReportOptions:

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

Crpe1.ReportOptions.TranslateDOSStrings := cTrue;

Crpe1.Output := toWindow;

Crpe1.Execute;

ReportOptions UseIndexForSpeed property

Declaration

property UseIndexForSpeed: TCrBoolean;

Type

TCrBoolean = (cFalse, cTrue, cDefault);

Description

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).

VCL Reference

522

Example

This example turns off the UseIndexForSpeed property of ReportOptions:

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

Crpe1.ReportOptions.UseIndexForSpeed := cFalse;

Crpe1.Output := toWindow;

Crpe1.Execute;

ReportOptions VerifyOnEveryPrint property

Declaration

property VerifyOnEveryPrint: TCrBoolean;

Type

TCrBoolean = (cFalse, cTrue, cDefault);

Description

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 field-types 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.

NOTE: For PC-type databases: it may be useful to turn this property on, or use the VerifyDatabase method, when pointing a Report that uses linked tables, to new tables with different names, so that the linking and index information gets updated correctly.

Example

This example sets the VerifyOnEveryPrint property of ReportOptions:

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

Crpe1.ReportOptions.VerifyOnEveryPrint := cTrue;

Crpe1.Output := toWindow;

Crpe1.Execute;

ReportOptions ZoomMode property

Declaration

property ZoomMode: TCrZoomPreview;

VCL Reference

523

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