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

SendDetailCopies method

Declaration

procedure SendDetailCopies;

Description

SendDetailCopies sends the value of the DetailCopies property to the Crystal Reports Print Engine. This procedure is called automatically when the Execute method is called, provided that the SendOnExecute property is set to True. It does not normally need to be called in code.

If SendOnExecute is set to False, then all of the information sent from the Crystal component to the Print Engine must be done manually. This feature is provided for debugging purposes. We recommend that you leave SendOnExecute to True.

Example

In this example, the DetailCopies settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.SendDetailCopies;

SendDialogParent method

Declaration

procedure SendDialogParent;

Description

The SendDialogParent method sends the VCL's DialogParent property settings to the Crystal Reports Print Engine. This is automatically called during the Execute method (provided that SendOnExecute is set to True), so does not normally need to be called in code.

Example

In this example, the DialogParent settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.SendDialogParent;

VCL Reference

156

SendDiscardSavedData method

Declaration

procedure SendDiscardSavedData;

Description

SendDiscardSavedData sends the value of the DiscardSavedData property to the Crystal Reports Print Engine. This procedure is called automatically when the Execute method is called, provided that the SendOnExecute property is set to True. It does not normally need to be called in code.

If SendOnExecute is set to False, then all of the information sent from the Crystal component to the Print Engine must be done manually. This feature is provided for debugging purposes. We recommend that you leave SendOnExecute to True.

Example

In this example, the DiscardSavedData settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.SendDiscardSavedData;

SendFieldMapping method

Declaration

function SendFieldMapping: boolean;

Description

The SendFieldMapping method sends the FieldMapping property settings to the Print Engine. This method is called internally in the VCL whenever VerifyDatabase is called, therefore it should not be necessary to make this call directly.

Also, if FieldMapping is set to something other than "fmAuto", and VerifyDatabase is not called directly in code, VerifyDatabase will be automatically called in the Execute method of the main class (Crpe1.Execute).

VCL Reference

157

SendOutput method

Declaration

procedure SendOutput;

Description

SendOutput sends the value of the Output property to the Crystal Reports Print Engine. This procedure is called automatically when the Execute method is called, provided that the SendOnExecute property is set to True. It does not normally need to be called in code.

If SendOnExecute is set to False, then all of the information sent from the Crystal component to the Print Engine must be done manually. This feature is provided for debugging purposes. We recommend that you leave SendOnExecute to True.

Example

In this example, the Output settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.SendOutput;

SendProgressDialog method

Declaration

procedure SendProgressDialog;

Description

SendProgressDialog sends the value of the ProgressDialog property to the Crystal Reports Print Engine. This procedure is called automatically when the Execute method is called, provided that the SendOnExecute property is set to True. It does not normally need to be called in code.

If SendOnExecute is set to False, then all of the information sent from the Crystal component to the Print Engine must be done manually. This feature is provided for debugging purposes. We recommend that you leave SendOnExecute to True.

Example

In this example, the ProgressDialog settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.SendProgressDialog;

VCL Reference

158

SendReportTitle method

Declaration

procedure SendReportTitle;

Description

SendReportTitle sends the value of the ReportTitle property to the Crystal Reports Print Engine. This procedure is called automatically when the Execute method is called, provided that the SendOnExecute property is set to True. It does not normally need to be called in code.

If SendOnExecute is set to False, then all of the information sent from the Crystal component to the Print Engine must be done manually. This feature is provided for debugging purposes. We recommend that you leave SendOnExecute to True.

Example

In this example, the ReportTitle settings are sent from the Crystal component to the Crystal Reports Print Engine DLL. This is normally handled automatically in the Execute method:

Crpe1.SendReportTitle;

SetFocus method

Declaration

procedure SetFocus;

Description

This procedure sets the focus of the Windows desktop to the Crystal Preview Window. Therefore it should only be called after the Execute method, and can be used in concert with the Focused method.

Normally SetFocus does not need to be called, but if you find that your application Form keeps coming to the front after the Preview Window opens, then this call can be used to prevent that.

Example

This code example checks to see if the Crystal Preview Window is the topmost window. If not, it makes it the topmost:

Crpe1.ReportName := 'MyReport.rpt'; Crpe1.Output := toWindow; Crpe1.Execute;

if not Crpe1.Focused then Crpe1.SetFocus;

VCL Reference

159

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