Платформа 3V/Отчет/5. Настроить представление, оформление отчета/Настроить сортировку: различия между версиями
Перейти к навигации
Перейти к поиску
м (A.saydakova переименовал страницу Содержание/Отчет/Сортировка в Платформа 3V/Отчет/Сортировка поверх перенаправления) |
|||
Строка 58: | Строка 58: | ||
| nullsSortingMode || нулевые значения в начале / в конце ("PlaceFirst" / "PlaceLast") | | nullsSortingMode || нулевые значения в начале / в конце ("PlaceFirst" / "PlaceLast") | ||
|} | |} | ||
+ | |||
+ | === Пример использования в отчете=== | ||
+ | Описание кейса и примеры сортировок по различным атрибутам с разными типами данных см. на странице [[Платформа_3V/Справочник/Cортировка|'''Сортировка элементов справочника (SortingOptions)''']] | ||
+ | |||
+ | <div class="toccolours mw-collapsible mw-collapsed" style="width:800px; overflow:auto;"> | ||
+ | <div style="font-weight:bold;line-height:1.6;">JSON отчета с сортировкой по возрастанию атр."Наименование"</div> | ||
+ | <div class="mw-collapsible-content mw-collapsed-content"> | ||
+ | <syntaxhighlight lang="JSON" line> | ||
+ | { | ||
+ | "workflowId": null, | ||
+ | "leftHeader": { | ||
+ | "useLazyDataLoadingStrategy": false, | ||
+ | "dictionaries": [ | ||
+ | { | ||
+ | "showDataIfAbsentFilter": null, | ||
+ | "coordAttribute": null, | ||
+ | "cartesianOptions": "Default", | ||
+ | "canSelectAttribute": null, | ||
+ | "groupingOptions": null, | ||
+ | "groupingMethod": "Default", | ||
+ | "sortingOptions": { | ||
+ | "attributes": [ | ||
+ | { | ||
+ | "attribute": { | ||
+ | "id": 2, | ||
+ | "discriminator": "OwnAttributeDefinitionDto" | ||
+ | }, | ||
+ | "sortDirection": "Ascending", | ||
+ | "nullsSortingMode": "PlaceFirst" | ||
+ | } | ||
+ | ] | ||
+ | }, | ||
+ | "rootElement": null, | ||
+ | "virtualElements": null, | ||
+ | "displayValueOptions": null, | ||
+ | "displayAttribute": null, | ||
+ | "dictionaryId": 67, | ||
+ | "filter": { | ||
+ | "value": null, | ||
+ | "skipIfValueNull": false, | ||
+ | "attributeId": null, | ||
+ | "attribute": { | ||
+ | "id": 1, | ||
+ | "discriminator": "OwnAttributeDefinitionDto" | ||
+ | }, | ||
+ | "conditionType": "AllElements", | ||
+ | "inversion": false, | ||
+ | "discriminator": "ValueConditionalDictionaryFilterDto" | ||
+ | }, | ||
+ | "selection": null, | ||
+ | "hierarchyId": null, | ||
+ | "limit": null | ||
+ | } | ||
+ | ], | ||
+ | "dictionaryAttributesLinks": [], | ||
+ | "specialFilters": { | ||
+ | "filtersByDataOptions": { | ||
+ | "filtersByData": [], | ||
+ | "needRestoreFullHierachy": false, | ||
+ | "joinOption": "Or", | ||
+ | "restoreElements": null | ||
+ | }, | ||
+ | "dictionaryAttributesLinks": [], | ||
+ | "needRestoreFullHierachy": false, | ||
+ | "restoreElements": null | ||
+ | }, | ||
+ | "isEditable": false | ||
+ | }, | ||
+ | "topHeader": { | ||
+ | "topHeaderItems": [ | ||
+ | { | ||
+ | "dictionaryAttributes": [ | ||
+ | { | ||
+ | "dictionaryId": 67, | ||
+ | "attribute": { | ||
+ | "id": 2, | ||
+ | "discriminator": "OwnAttributeDefinitionDto" | ||
+ | }, | ||
+ | "filter": null, | ||
+ | "sortingOptions": null, | ||
+ | "attributeId": null, | ||
+ | "displayAttributeType": "AttributeName", | ||
+ | "displayAttributeName": null, | ||
+ | "addFirstElementValue": false, | ||
+ | "overwriteNotFirstElementValues": true, | ||
+ | "delimiter": ", ", | ||
+ | "hideAttributeNameInHeader": false, | ||
+ | "headerNameDelimiter": " / ", | ||
+ | "duplicateValuesForNextDictionaries": true, | ||
+ | "duplicateValuesForNextRows": true, | ||
+ | "displayValueOptions": null, | ||
+ | "linkedAttributeSettings": null, | ||
+ | "skippedFilterAttributesByLink": [], | ||
+ | "filterOptionsByLinks": null | ||
+ | } | ||
+ | ], | ||
+ | "settings": null, | ||
+ | "hyperlinkOptions": null, | ||
+ | "hasImage": false, | ||
+ | "columnOptions": null, | ||
+ | "discriminator": "AttributeHeaderItemDto" | ||
+ | }, | ||
+ | { | ||
+ | "dictionaryAttributes": [ | ||
+ | { | ||
+ | "dictionaryId": 67, | ||
+ | "attribute": { | ||
+ | "id": 21, | ||
+ | "discriminator": "OwnAttributeDefinitionDto" | ||
+ | }, | ||
+ | "filter": null, | ||
+ | "sortingOptions": null, | ||
+ | "attributeId": null, | ||
+ | "displayAttributeType": "AttributeName", | ||
+ | "displayAttributeName": null, | ||
+ | "addFirstElementValue": false, | ||
+ | "overwriteNotFirstElementValues": true, | ||
+ | "delimiter": ", ", | ||
+ | "hideAttributeNameInHeader": false, | ||
+ | "headerNameDelimiter": " / ", | ||
+ | "duplicateValuesForNextDictionaries": true, | ||
+ | "duplicateValuesForNextRows": true, | ||
+ | "displayValueOptions": null, | ||
+ | "linkedAttributeSettings": null, | ||
+ | "skippedFilterAttributesByLink": [], | ||
+ | "filterOptionsByLinks": null | ||
+ | } | ||
+ | ], | ||
+ | "settings": null, | ||
+ | "hyperlinkOptions": null, | ||
+ | "hasImage": false, | ||
+ | "columnOptions": null, | ||
+ | "discriminator": "AttributeHeaderItemDto" | ||
+ | }, | ||
+ | { | ||
+ | "dictionaryAttributes": [ | ||
+ | { | ||
+ | "dictionaryId": 67, | ||
+ | "attribute": { | ||
+ | "id": 22, | ||
+ | "discriminator": "OwnAttributeDefinitionDto" | ||
+ | }, | ||
+ | "filter": null, | ||
+ | "sortingOptions": null, | ||
+ | "attributeId": null, | ||
+ | "displayAttributeType": "AttributeName", | ||
+ | "displayAttributeName": null, | ||
+ | "addFirstElementValue": false, | ||
+ | "overwriteNotFirstElementValues": true, | ||
+ | "delimiter": ", ", | ||
+ | "hideAttributeNameInHeader": false, | ||
+ | "headerNameDelimiter": " / ", | ||
+ | "duplicateValuesForNextDictionaries": true, | ||
+ | "duplicateValuesForNextRows": true, | ||
+ | "displayValueOptions": null, | ||
+ | "linkedAttributeSettings": null, | ||
+ | "skippedFilterAttributesByLink": [], | ||
+ | "filterOptionsByLinks": null | ||
+ | } | ||
+ | ], | ||
+ | "settings": null, | ||
+ | "hyperlinkOptions": null, | ||
+ | "hasImage": false, | ||
+ | "columnOptions": null, | ||
+ | "discriminator": "AttributeHeaderItemDto" | ||
+ | }, | ||
+ | { | ||
+ | "dictionaryAttributes": [ | ||
+ | { | ||
+ | "dictionaryId": 67, | ||
+ | "attribute": { | ||
+ | "id": 23, | ||
+ | "discriminator": "OwnAttributeDefinitionDto" | ||
+ | }, | ||
+ | "filter": null, | ||
+ | "sortingOptions": null, | ||
+ | "attributeId": null, | ||
+ | "displayAttributeType": "AttributeName", | ||
+ | "displayAttributeName": null, | ||
+ | "addFirstElementValue": false, | ||
+ | "overwriteNotFirstElementValues": true, | ||
+ | "delimiter": ", ", | ||
+ | "hideAttributeNameInHeader": false, | ||
+ | "headerNameDelimiter": " / ", | ||
+ | "duplicateValuesForNextDictionaries": true, | ||
+ | "duplicateValuesForNextRows": true, | ||
+ | "displayValueOptions": null, | ||
+ | "linkedAttributeSettings": null, | ||
+ | "skippedFilterAttributesByLink": [], | ||
+ | "filterOptionsByLinks": null | ||
+ | } | ||
+ | ], | ||
+ | "settings": null, | ||
+ | "hyperlinkOptions": null, | ||
+ | "hasImage": false, | ||
+ | "columnOptions": null, | ||
+ | "discriminator": "AttributeHeaderItemDto" | ||
+ | } | ||
+ | ], | ||
+ | "needFilterAttributesByLinks": false, | ||
+ | "enableFilterByLinks": false, | ||
+ | "numerationSettings": null, | ||
+ | "filterOptions": null | ||
+ | }, | ||
+ | "parameters": [], | ||
+ | "styles": [], | ||
+ | "styleOptions": [], | ||
+ | "stylesTemplate": [], | ||
+ | "filtersByDataOptions": null, | ||
+ | "view": null, | ||
+ | "externalExecutions": null, | ||
+ | "settings": null, | ||
+ | "code": "P_Сортировка элементов справочника (SortingOptions)", | ||
+ | "id": 82, | ||
+ | "name": "Сортировка элементов справочника (SortingOptions)" | ||
+ | } | ||
+ | </syntaxhighlight> | ||
+ | </div></div> | ||
+ | <br> | ||
+ | [[Файл:Сортировка в отчете.jpg|600px|безрамки|без]] |
Версия 13:21, 22 апреля 2021
Сортировка по столбцу
"sortings": [ ] |
---|
1 {
2 "column": 9,
3 "sortDirection": "Descending",
4 "nullsSortingMode": "PlaceLast",
5 "discriminator": "PivotColumnSortingDto"
6 }
|
Параметр | Описание |
---|---|
"column": 0 | нумерация столбцов начинается с 0 |
"sortDirection": "Descending" / Ascending | по убыванию / по возрастанию |
"nullsSortingMode": "PlaceFirst" / "PlaceLast", | нулевые в начале / нулевые в конце |
Сортировка по справочнику
Последовательное расположение в зависимости от выбранного атрибута справочника
"sortingOptions": [ ] |
---|
1 "sortingOptions": {
2 "attributes": [
3 {
4 "attribute": {
5 "id": 1,
6 "discriminator": "OwnAttributeDefinitionDto"
7 },
8 "sortDirection": "Descending",
9 "nullsSortingMode": "PlaceFirst"
10 }
11 ]
12 }
|
Значение | Описание |
---|---|
attribute | описание пути до атрибута, по которому будет производиться сортировка |
sortDirection | Направление по убыванию / по возрастанию ("Descending" / "Ascending") |
nullsSortingMode | нулевые значения в начале / в конце ("PlaceFirst" / "PlaceLast") |
Пример использования в отчете
Описание кейса и примеры сортировок по различным атрибутам с разными типами данных см. на странице Сортировка элементов справочника (SortingOptions)
развернуть
JSON отчета с сортировкой по возрастанию атр."Наименование"