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

Export Email property

Declaration

property Email: TCrpeExportEmail;

Type

TCrpeExportEmail = class(TPersistent)

Description

The Email object encompasses the properties needed to specify an Email destination for Export. If the Export Destination is EmailViaMapi, then the four properties available are:

CCList

Message

Subject

ToList

If the Destination is EmailViaVIM, then a fifth property is also available:

VIMBCCList

The Clear method can be used to set all the properties back to empty strings.

NOTE: When exporting to Email, the FileName property will not apply, but the FileName will be taken from the ReportName. One exception to this rule is the HTML format, in which a FileName can be specified when exporting to Email.

There currently seems to be a problem exporting to ODBC when the destination is Email. The Table will be created on the ODBC Data Source, but the Email send will fail. If you need to export an ODBC table to Email, it will have to be done in two steps:

1.Export the Report to ODBC Table

2.Send the Table to Email in your application code.

Example

Export to Email in HTML format:

Crpe1.ReportName := 'MyReport.rpt'; Crpe1.Output := toExport;

with Crpe1.Export do begin

Destination := toEmailViaMapi; FileType := HTML3;

VCL Reference

260

FileName := 'C:\MyReport.htm'; Email.ToList := 'Maxwell Smart'; Email.CCList := 'The Chief'; Email.Subject := 'Chaos';

Email.Message := 'Would you believe...'; end;

Crpe1.Execute;

Export Email CCList property

Declaration

property CCList: string;

Description

Specifies the CC list to which you want your Email message sent. Applies to both MAPI and VIM. Multiple names must be separated by a semicolon.

Example

Export to Email in HTML format:

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

with Crpe1.Export do begin

Destination := toEmailViaMapi; FileType := HTML3;

FileName := 'C:\MyReport.htm'; Email.ToList := 'Maxwell Smart'; Email.CCList := 'The Chief'; Email.Subject := 'Chaos';

Email.Message := 'Would you believe...'; end;

Crpe1.Execute;

Export Email Message property

Declaration

property Message: string;

Description

Specifies the string you want to appear as the body of your Email Message. Applies to both MAPI and VIM.

VCL Reference

261

Example

Export to Email in HTML format:

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

with Crpe1.Export do begin

Destination := toEmailViaMapi; FileType := HTML3;

FileName := 'C:\MyReport.htm'; Email.ToList := 'Maxwell Smart'; Email.CCList := 'The Chief'; Email.Subject := 'Chaos';

Email.Message := 'Would you believe...'; end;

Crpe1.Execute;

Export Email Subject property

Declaration

property Subject: string;

Description

Specifies the Subject line in your Email message. Applies to both MAPI and VIM.

Example

Export to Email in HTML format:

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

with Crpe1.Export do begin

Destination := toEmailViaMapi; FileType := HTML3;

FileName := 'C:\MyReport.htm'; Email.ToList := 'Maxwell Smart'; Email.CCList := 'The Chief'; Email.Subject := 'Chaos';

Email.Message := 'Would you believe...'; end;

Crpe1.Execute;

VCL Reference

262

Export Email ToList property

Declaration

property ToList: string;

Description

Specifies the "To" list to which you want your Email message directed. Applies to both MAPI and VIM. Multiple names must be separated by a semicolon.

Example

Export to Email in HTML format:

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

with Crpe1.Export do begin

Destination := toEmailViaMapi; FileType := HTML3;

FileName := 'C:\MyReport.htm'; Email.ToList := 'Maxwell Smart'; Email.CCList := 'The Chief'; Email.Subject := 'Chaos';

Email.Message := 'Would you believe...'; end;

Crpe1.Execute;

Export Email VIMBCCList property

Declaration

property VIMBCCList: string;

Description

Specifies the "Blind CC" list to which you want your Email message copied. Applies to VIM only (cc:Mail), not MAPI. Multiple names must be separated by a semicolon.

VCL Reference

263

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