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

Export Create method, Page 289

Export Destroy method, Page 290

Export Send method, Page 290

FieldMapping

Declaration

property FieldMapping: TCrFieldMappingType;

Type

TCrFieldMappingType = (fmAuto, fmPrompt, fmEvent);

Description

FieldMapping can be used to provide a way to remap database field names in a Report if the field names have changed since the Report was designed. If the field names stored in the Report no longer match the physical database table field names, the fields in the Report are considered to be "unmapped". The FieldMapping setting is used in the VerifyDatabase method to determine how unmapped fields will be handled.

VerifyDatabase will cause the Print Engine to do one of three things, depending on the setting of the FieldMapping property:

1.FieldMapping set to fmAuto

Any fields in the Report that no longer have the same field names will be removed from the Report.

2.FieldMapping set to fmPrompt

If any field names have changed, the Print Engine will show a Mapping dialog box that can be used to map the fields to fields from the current database table.

3.FieldMapping set to fmEvent

If any field names have changed, an OnFieldMapping event will be triggered. This event is on the events page of the Object Inspector, and allows the developer to either design their own Mapping dialog box, or bypass the dialog box by doing the mapping in code.

NOTE: FieldMapping is only available in SCR 7 or higher. The actual sequence of calls made to invoke FieldMapping should follow this order:

Set the ReportName property.

Set any LogOn Information (if using ODBC or SQL tables) via either Connect, LogOnInfo, or LogOnServer.

Set any new Table location information via the Tables object.

Set the FieldMapping property.

Call VerifyDatabase.

Alternatively, if VerifyDatabase is not called directly in code, it will automatically run when Crpe1.Execute is called.

VCL Reference

26

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