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

Description

The Exchange object encompasses the properties needed to specify an Exchange Folder destination for Export. The three properties are: Profile, Folder, and Password.

Profile is the Exchange Profile name.

Password is the Exchange Password required.

Folder is the Exchange Folder string which represents the desired destination. The "@" sign is used to specify sub-folders for the Folder property:

Crpe1.Export.Exchange.Folder := 'Personal Folders@Inbox';Export Exchange

Example

Export to Exchange Folder in PaginatedText format:

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

with Crpe1.Export do begin

Destination := toMSExchange; FileType := PaginatedText; LinesPerPage := 25;

Exchange.Profile := 'Microsoft Outlook'; Exchange.Folder := 'Personal Folders@Inbox'; Exchange.Password := 'Agent86';

end; Crpe1.Execute;

Export Exchange Folder property

Declaration

property Folder: string;

Description

Specifies the Exchange Folder name when you want to export to Microsoft Exchange Folder. ExchangeFolder is case-sensitive. If you enter a value in the wrong case you will receive an error message. The "@" symbol is used to indicate sub-folder levels: 'Personal Folders@Inbox'.

VCL Reference

272

Example

Export to Exchange Folder in PaginatedText format:

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

with Crpe1.Export do begin

Destination := toMSExchange; FileType := PaginatedText; LinesPerPage := 25;

Exchange.Profile := 'Microsoft Outlook'; Exchange.Folder := 'Personal Folders@Inbox'; Exchange.Password := 'Agent86';

end; Crpe1.Execute;

Export Exchange Password property

Declaration

property Password: string;

Description

Specified the Exchange Password when you want to export to Microsoft Exchange.

Example

Export to Exchange Folder in PaginatedText format:

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

with Crpe1.Export do begin

Destination := toMSExchange; FileType := PaginatedText; LinesPerPage := 25;

Exchange.Profile := 'Microsoft Outlook'; Exchange.Folder := 'Personal Folders@Inbox'; Exchange.Password := 'Agent86';

end; Crpe1.Execute;

VCL Reference

273

Export Exchange Profile property

Declaration

property Profile: string;

Description

Specifies the Exchange Profile to export a file, when you want to export a Report to Microsoft Exchange.

Example

Export to Exchange Folder in PaginatedText format:

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

with Crpe1.Export do begin

Destination := toMSExchange; FileType := PaginatedText; LinesPerPage := 25;

Exchange.Profile := 'Microsoft Outlook'; Exchange.Folder := 'Personal Folders@Inbox'; Exchange.Password := 'Agent86';

end; Crpe1.Execute;

Export Exchange Clear method

Declaration

procedure Clear;

Description

This method can be used to set the Exchange properties to their default values:

Folder := '';

Password := '';

Profile := '';

It is called automatically if the Clear method is called for the main component, but may be called in code as needed.

VCL Reference

274

Example

The following example illustrates the use of the Clear method between exporting a Report to Exchange Folders. This is not really required for the Exchange object since all the properties must be filled with new values anyway, but it could be required for other objects in the Crystal Reports component in cases where some of the properties are not going to be filled out with new values:

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

with Crpe1.Export do begin

Destination := toMSExchange; FileType := PaginatedText; LinesPerPage := 25;

Exchange.Profile := 'Microsoft Outlook'; Exchange.Folder := 'Personal Folders@Inbox'; Exchange.Password := 'Agent86';

end; Crpe1.Execute;

with Crpe1.Export.Exchange do begin

{Clear the Exchange properties} Clear;

{Set the new values}

Profile := 'Microsoft Outlook'; Folder := 'Personal Folders@Inbox'; Password := 'Agent99';

end; Crpe1.Execute;

Export Exchange CopyFrom method

Declaration

function CopyFrom(Source: TCrpeExportExchange): boolean;Description

The CopyFrom method copies the Exchange property values from another TCrpeExportExchange object. It is similar to Delphi's Assign method. It is useful for transferring or temporary storage of values.

VCL Reference

275

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