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

GroupSortFields

Declaration

property GroupSortFields: TCrpeGroupSortFields;

Type

TCrpeGroupSortFields = class(TPersistent)

Description

The GroupSortFields object contains the properties needed to set and modify the sorting of the Groups in a Report. The main properties are:

The Number property contains the GroupSortField number, which is zero-based.

The Field property contains the actual GroupSortField string. This should be a Summary field, although it does not need to be a Summary field that already exists in the Report. Any field names used in the Field property should be enclosed in braces: {company.STATE}.

The Direction property specifies the sorting direction, either sdDescending, sdAscending, or sdDefault.

The DeleteGSF property can be used to delete a GroupSortField. When a GroupSortField is set to be deleted, and the Report is run, the deleted GroupSortField will no longer be in the Report that is currently loaded in memory, or the Crystal component either. To reference it again, the Report will have to be re-loaded, or the Add method will have to be used to add it back.

The Retrieve method will fetch the GroupSortFields currently in the Report.

The Count method will return the number of GroupSortFields items stored in the GroupSortFields object.

The Item and ItemIndex properties can be used to navigate through the items in the GroupSortFields object.

Note on Summary fields

Summary fields are usually constructed in this fashion:

SummaryFunction(DatabaseField,GroupingField)

so they usually look something like this:

Sum({company.SALES},{company.STATE})

This would read: "Sum of the Company's Sales per State". The last parameter must be a field that the Report is grouped on.

VCL Reference

46

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