Calculated fields in request 1c. Expression language functions of the data composition system. What is a calculated field

In light of the upcoming release of 8.2.14, I will try to describe some of the new functions of the data composition system.

Open the data composition schema, preferably in an external report, to make it easier to edit.

We add a dataset of the query type and write, either manually or using the query constructor, a simple query:

1. Set up a request in the ACS.

2. Setting up calculated fields in the ACS

3. We perform data composition setup on the settings tab

4. Launch 1C Enterprise 8.2.14. We open the report. We form, we get.

Description of the new functions themselves:

1. The current date()

Returns the system date. When the layout is linked, in all expressions that are present in the layout, the CurrentDate () function is replaced with the value of the current date.

2. CALCULATE EXPRESSION ()

Syntax:

Evaluate Expression (,)

Description:

The function is intended for evaluating an expression in the context of some grouping.

The function takes into account the selection of groupings, but does not take into account hierarchical selections.

The function cannot be applied to a grouping in the group selection of this grouping. For example, in the selection of the grouping Nomenclature, you cannot use the expression CalculateExpression ("Sum (SumTurnover)", "TotalTotal")\u003e 1000... But such an expression can be used in hierarchical selection.

If the end record precedes the start record, then it is considered that there are no records for calculating detailed data and calculating aggregate functions.

When calculating interval expressions for the grand total (the Grouping parameter is set to General Total), it is assumed that there are no records for calculating detailed data and calculating aggregate functions.

Layout linker when generating function expression EvaluateExpression, in case the ordering expression contains fields that cannot be used in the grouping, replaces the function EvaluateExpression on NULL.

Options

A type: Line... The expression to evaluate.

A type: Line... Contains the name of the grouping in the context of which the expression is to be evaluated. If an empty string is used as a grouping name, the calculation will be performed in the context of the current grouping. If the GeneralTotal string is used as the grouping name, the calculation will be performed in the context of the grand total. Otherwise, the calculation will be performed in the context of the parent grouping with that name.

For example:

Amount (Sales.SumTurnover) / Calculate ("Amount (Sales.SumTurnover)", "TotalTotal")

IN this example the result is the ratio of the sum over the field Sales.AmountTurnover grouping records to the sum of the same field in the entire layout;

A type: Line... The parameter can take the following values:

· Grand total - the expression will be evaluated for all grouping records.

· Hierarchy - the expression will be evaluated for the parent hierarchical record, if any, and for the entire grouping, if there is no parent hierarchical record.

· Grouping - the expression will be evaluated for the current group record of the grouping.

· GroupingNonResource - when calculating a function for a group record by resources, the expression will be calculated for the first group record of the original grouping.

When calculating the function EvaluateExpression () with meaning GroupingNonResource for group records that are not groupings by resources, the function is calculated in the same way as it would be calculated if the parameter value was equal to the value Grouping.

The composer of the data composition template, when generating the data composition template, when outputting the resource-field by which the grouping is performed to the template, puts an expression calculated using the function EvaluateExpression () , specifying the parameter GroupingNonResource... For the rest of the resources, the regular resource expressions are grouped by resource.

A type: Line... Indicates with which record to start the fragment, in which to calculate the aggregate functions of the expression and from which record to get the values \u200b\u200bof fields outside the aggregate functions. The value can be one of the following:

· First

· Last

· Previous (Previous)

· Next (Next)

· Current

· Limiting Value (BoundaryValue) Limiting Value

A type: Line... Indicates to which record to continue the fragment in which to evaluate the aggregate functions of the expression. The value can be one of the following:

· First... You need to get the first grouping record. An expression can be specified after the word in brackets, the result of which will be used as an offset from the beginning of the grouping. The resulting value must be an integer number greater than zero. For example, First (3) - getting the third record from the beginning of the grouping.

If the first record goes outside the grouping limits, then it is considered that there are no records. For example, if there are 3 records, and you want to get the First (4), then it is considered that there are no records.

· Last... You need to get the latest grouping record. After the word in brackets, you can specify an expression, the result of which will be used as an offset from the end of the grouping. The resulting value must be an integer number greater than zero. For example, Last (3) - getting the third record from the end of the grouping.

If the last record is outside the grouping limits, then it is considered that there are no records. For example, if there are 3 records, and you want to get the Last (4), then it is considered that there are no records.

· Previous (Previous)... You need to get the previous grouping record. An expression can be specified after the word in brackets, the result of which will be used as an offset back from the current grouping record. For example, Previous (2) - get the previous one from the previous record.

If the previous record goes beyond the grouping (for example, for the second grouping record you want to get Previous (3), then the first grouping record is obtained.

When retrieving the previous record for the grouping total, the first record is considered.

· Next (Next)... You need to get the next grouping record. An expression can be specified after the word in brackets, the result of which will be used as an offset forward from the current grouping record. For example, Next (2) - get next from next record.

If the next record goes out of the grouping, then it is considered that there are no records. For example, if there are 3 records and Next () is received for the third record, then there are no records.

When the next record is received for the grouping total, it is considered that there is no record.

· Current... You need to get the current record.

When retrieving for the grouping total, the first record is obtained.

· Limiting Value (BoundaryValue)... The need to get a record at the specified value. After the word Limiting Value in brackets, you need to specify an expression with the value of which you want to start a fragment, the first ordering field.

As a record, the first record will be obtained, the value of the ordering field of which is greater than or equal to the specified value. For example, if the Period field is used as the ordering field, and it has the values \u200b\u200b01.01.2010, 01.02.2010, 01.03.2010, and you want to get ConstrainingValue (DateTime (2010, 1, 15)), then you will receive a record with the date 02/01/2010.

A type: Line... Lists expressions, separated by commas, that describe the ordering rules. If not specified, the ordering is performed in the same way as for the grouping for which the expression is evaluated. After each expression, you can specify keyword Age (to sort in ascending order), Descending (for descending order) and Auto-ordering (to order the referenced fields by the fields by which to order the referenced object). Word Auto-ordering can be used as with a word Age, so with the word Descending.

A type: Line... Similar to the parameter Sorting... Used to arrange hierarchical records. If not specified, the layout composer generates the ordering according to the ordering specified in the parameter Sorting.

A type: Line... Specifies the rule for determining the previous or next record in case there are several records with the same ordering value:

· Separately indicates that a sequence of ordered records is used to define the previous and next records. Default value.

· Together indicates that the previous and next records are determined based on the values \u200b\u200bof the ordering expressions.

For example, if the resulting sequence is ordered by date:

date Full name Value
1 01 January 2001

Ivanov M.

10
2 02 January 2001 Petrov S. 20
3 03 January 2001 Sidorov R. 30
4 04 January 2001 Petrov S. 40

Separately, then:

The previous entry to entry 3 will be entry 2.

Current, Current (respectively, parameters Start and the end), then for record 2 this fragment will consist of one record 2. The expression will be equal to 20.

If the parameter value is Together, then:

The previous entry to entry 3 will be entry 1.

§ if the calculated fragment is defined as Current, Current (respectively, parameters Start and the end), then for record 2 this fragment will consist of records 2 and 3. Expression ComputeExpression ("Sum (Value)", Current, Current) will be 50.

When specified, the parameter value is Together, in parameters Start and the end you cannot specify an offset for positions First, Last, Previous, Next.

Calculate Expression ("Sum (SumTurnover)", "First", "Current")

If you want to get the grouping value in the previous line, you can use the following expression:

Evaluate Expression (Course, Previous)

List new functions:

EvaluateExpressionGroupedArray(,) -

The function returns an array, each element of which contains the result of evaluating the expression to be grouped by the specified field.

EvaluateExpressionGroupedValuesTable(,) -

The function returns a table of values, each row of which contains the result of evaluating expressions to group by the specified field

ValueFilled() - Returns True if value is different from value of this type by default, non-NULL, non-null reference, non-Undefined. For boolean values NULL is checked. For strings, it is checked for the absence of non-whitespace characters

Format(,) - Get the formatted string of the passed value. The format string is set in accordance with the format string of the 1C: Enterprise system.

Substring(, , ) - This function is designed to extract a substring from a string.

Line Length() - The function is designed to determine the length of the string. Parameter is a string type expression

Line() - If an array is passed as a parameter, the function returns a string containing string representations of all elements of the array, separated by ";" characters. If a table of values \u200b\u200bis passed as a parameter, the function returns a string containing string representations of all rows of the table of values, with cell representations of each row separated by ";" characters, and strings - by linefeed. If any element has an empty string representation, then a string is displayed instead of its representation.

We have examined in some detail the settings for reports implemented on the basis of the ACS. Now let's take a look at the finer and more detailed settings of the report options. The window of "advanced" settings of the report variant is called by the command "More" - "Other" - "Change the variant of the report".

The window for changing the report variant is divided into two parts:

1. Structure of the report.

2. Report settings.


The structure section of a report variant is similar to the "Structure" tab of the standard report settings. The purpose and configuration of groupings is discussed in detail in Part 1 of the article.

The table of the structure of the report variant, in addition to the column with the groupings itself, contains several additional columns:

The settings section of the report option gives the user ample opportunity to configure the report to suit his needs. It almost completely coincides with standard settings of the report discussed in Part 1. Let's consider all the tabs of the section and note the differences.

The settings section consists of the following tabs:

1. Parameters. Contains ACS parameters available to the user.

ACS parameter is some value used to get report data. This can be a condition value for selecting or validating data, or an auxiliary value.


The parameter table is presented in the format "Parameter" - "Value". Parameter values \u200b\u200bcan be changed if necessary. Clicking on the Custom Settings Item Properties button opens the custom settings for the item.


In this window, you can select whether the element will be included in the user settings (i.e. visible to the user when setting up the report), set the element presentation and edit mode ( fast access in the report header, usual in the report settings and unavailable).

Customization item properties also have groupable fields, fields, filters, and conditional elements.

2. Custom fields. Contains fields that the user himself forms based on the data selected by the report.


User can add two kinds of fields:

  • New selection field ...
  • New expression field ...

Select fields allow you to calculate a value based on a given condition. The window for editing the selection field contains the title of the field and the table in which the selection, value and presentation of the field are set. Selection is a condition, depending on which the required value will be substituted.


For example, let's calculate an estimate of the number of sales. We will assume that if less than 10 units of a product are sold, they sold a little, and if more than 10 units, a lot. To do this, we will set 2 values \u200b\u200bof the calculated field: the first will be with the selection "Number of goods is less than or equal to" 10 "", the second with the selection "Number of goods is greater than" 10 "".

Expression fields allow you to compute a value using arbitrary algorithms. They can use the functions of the query language and the embedded programming language 1C. The expression field edit window contains two fields for detail and summary expressions. Totals records are groupings configured in the "Report Structure" area, in which you must use aggregate functions ("Sum", "Minimum", "Maximum", "Quantity").

For example, let's calculate the average discount percentage. The average discount percentage is calculated by the formula: [Amount of sales without discount] - [Amount of sales with discount] / [Amount of sales without discount]. It should be remembered that the amount of sales without a discount can be zero, so we use the SELECT operator to check. We get the following expressions:

· For detailed notes:

Choice

When [Amount of sales without discount] \u003d 0

Then 0

Otherwise [Amount of sales without discount] - [Amount of sales with discount] / [Amount of sales without discount]

the end

· For totals records:

Choice

When Amount ([Amount of sales without discount]) \u003d 0

Then 0

Otherwise Amount ([Amount of sales without discount]) - Amount ([Amount of sales with discount]) / Amount ([Amount of sales without discount])

the end

As mentioned earlier, in the expression of totals, we use the "Sum" aggregate function.

3. Groupable fields. Contains the fields by which the result of the report variant will be grouped. Grouping fields are configured separately for each of the groupings, but you can define general grouping fields for a report variant if you select the "Report" root in the structure tree. You can add a field from the report result, a custom field, or select an auto field, then the system will select the fields automatically. Also, this tab allows you to change the order of the grouped fields.


4. Fields. Contains the fields that will be output in the result of the report variant. The fields are configured separately for each of the groupings, but you can set general fields for a report variant if you select the "Report" root in the structure tree. You can add a field from the report result, a custom field, or select an auto field, then the system will select the fields automatically. Also, this tab allows you to change the order of the fields.

Fields can be grouped to logically highlight any part of the report or to define a special arrangement of columns. When adding a group, the "Location" column becomes active and allows you to select one of the location options:

  • Auto - the system places the fields automatically;
  • Horizontal - fields are arranged horizontally;
  • Vertically - fields are arranged vertically;
  • In a separate column - fields are located in different columns;
  • Together - the fields are arranged in one column.


5. Selection. Contains selections used in the report variant. Customizing selections was discussed in detail in Part 1 of this article. Filters are configured separately for each of the groupings, but you can set general filters for a report variant if you select the "Report" root in the structure tree.


6. Sorting. Contains the sort fields used in the report variant. Customizing sort fields was covered in detail in Part 1 of this article. Sorting is configured separately for each of the groupings, but you can set general sorting fields for a report variant if you select the "Report" root in the structure tree.


7. Conditional design. Contains conditional styling elements used in a report variant. Setting up conditional appearance was discussed in detail in Part 1 of this article. Conditional appearance is configured separately for each of the groupings, but you can set common conditional appearance elements for a report variant if you select the "Report" root in the structure tree.


8. Additional settings. Contains additional settings report preparation. Allows you to select a common appearance report, the location of fields, groupings, details, resources, totals, set chart settings, control the output of the title, parameters and selection, determine the position of resources and fix the header and grouping columns of the report option.


In conclusion, I would like to note that the report settings can not only be saved as a report variant, but also uploaded to a file ("More" menu - "Save settings"). To download, select “Load Settings” and select the saved file. Thus, we can transfer the settings of the report variant between different databases with the same configuration.


Based on this, we can summarize that the user can not only independently customize the report to fit his needs, but also save his settings and use them later if necessary.

EvaluateExpression - quite difficult aCS function for understanding, and examples of application in reference information rather scarce. This article contains examples that are sure to be useful to every developer:

  1. cumulative total in the grouping;
  2. the running total in the crosstab;
  3. getting the previous value;
  4. output of PM in one line.

1. Obtaining an indicator on a cumulative basis

Let's get the number of products on a cumulative basis at the grouping level. To do this, create a calculated field (see Figure 1).
On the "Resources" tab, set the function for the calculated field:
Calculate Expression ("Sum (NumberTurnover)", "First", "Current")
which will sum up the number of products from the first record to the current one (see Figure 2).

If you want to get the number of goods on a cumulative basis at the level of detailed records, then the function CalculateExpression is set for the calculated field on the tab "Calculated fields" (see Figure 3).
Depending on the level of obtaining the cumulative total, we create a grouping (see Figure 4): at the resource level - grouping by goods, at the DZ level - grouping of detailed records.
Figure 4. Groupings of the report with a cumulative total

2. Getting the value of the indicator from the previous line

Let's get the currency rate for the date and the previous date. To do this, create a calculated field and write the following expression in the expression field (see Figure 5):
Evaluate Expression (Course, Previous, Previous)
which will take the previous value of the currency rate for the current line, the last parameter of the function restricts data retrieval.
Since we are working at the level of detailed records, go directly to the "Settings" tab and create a grouping - detailed records.

3. Getting an indicator on a cumulative total in a cross-tab

Let's get the number of goods on a cumulative basis in the context of the period. To do this, create a calculated field (see Figure 1). On the "Resources" tab for a calculated field, we will specify the following expression (see Figure 6):
Calculate Expression ("Sum (NumberTurnover)", "Period", "First", "Current")
which, at the grouping level, will calculate the quantity of goods in the interval from the first line to the current one in the context of the period for each item.
On the "Settings" tab, create a table grouped by item in a row and grouped by period in a column (see Figure 7).

4. Output of tabular section data in one line

Methods for displaying tabular section data in one line, including the method using the EvaluateExpression function, are discussed in the article

One of the most convenient and unique development tools in 1C is the data composition system (ACS). Few in what information systems developers can create reports without writing program code... This mechanism was developed in order to simplify and speed up the development of reporting forms and give more possibilities users in working with the output data. The latter is very highly appreciated by advanced users who, thanks to this, can independently customize the report to their own needs, without waiting for the developers' actions.

Creation of a report in 1C via ACS

The process of developing a report using the ACS can be divided into the following stages:

  1. Creating a request. The request can be written manually or you can do without the program code using a convenient interface;
  2. Customizing the report. Fields, totals, groupings, parameters, report design are selected;
  3. After that, we just have to connect the resulting report to the configuration in any way possible.

Despite the ability of users to customize reports on the ACS, they must be created through the configurator.

Let's consider an example of creating external report on SKD:


Now we go into 1C, open our report to make sure that the actions taken are correct. All data is reflected, groupings can be collapsed and expanded. As you can see, ACS allows you to receive full-fledged reports without writing code, except for non-standard requirements. Considering that most reports have a similar structure, knowledge of the ACS will significantly reduce the development time for these objects.

This mechanism became very popular due to the support ample opportunities when generating a report. Moreover, they can be used not only by developers, but also by ordinary users.

ACS capabilities

There are situations when we have made a report, and then a user comes and asks to make a small revision. For example, display SKUs instead of item names. ACS allows users to make such improvements on their own using the button "More" - "Change option ...".


The window that opens is similar to the settings window in the report in the configurator, and it also has similar functions. To solve the problem, the user must go to the "Fields" tab and change the "Nomenclature" field. This field for editing is opened by double-clicking, and the "Select ..." button becomes available.


The window that opens provides us with the ability to select any value that will appear in the "Nomenclature" field. Some fields on the left have a plus sign - the developer has placed links in these fields, which means that we can see their details. We open the "Nomenclature" and see the article that we need. Select it and select it.


The window for editing report variants contains many useful functions data composition systems. For example, the user can independently change the order of groupings, add a selection or apply a conditional design. We finish editing and generate a report - as you can see, the entire nomenclature is now displayed as SKUs.


The 1C: Enterprise 8.3 ACS mechanism also has advanced functionality for developers. When developing the report, we used only 2 tabs - "Datasets" and "Settings", but there are many more of them in the ACS. To use all the functions of the data composition system, you need to understand what each of the tabs is for:

  1. Datasets - all queries involved in the formation of the report are listed here;
  2. Dataset links - used to build a link between different queries from the first tab;
  3. Calculated fields - a list of added fields not from the request. Most often it is used in cases when, based on the values \u200b\u200bof several fields, you need to get 1 value from a query;
  4. Resources. In 1C, the so-called fields for which you need to know the results. The resources support various arithmetic operations - sum, quantity, maximum, and others;
  5. Options. They are used if, to generate a report, it is necessary for the user to enter certain data - the date, divisions, or the item, for example;
  6. Layouts. Designed for those cases when users want to see a uniquely designed report. Create a separate place for signatures or a new upper part of the report - all this can be done here;
  7. Nested schemas. They are required when your report is to contain data from other reports;
  8. Settings. The section declares the displayed fields, groupings, and customizes the appearance of the report.


The number of possibilities inherent in the ACS mechanism by developers is large, but many of them are used extremely rarely. Even experienced 1C programmers over the years may not use some functions. To start successful work in the ACS, it is enough to know the basic concepts and frequently used settings. In rare cases, documentation will come to the rescue.

In light of the upcoming release of 8.2.14, I will try to describe some of the new functions of the data composition system.

Open the data composition schema, preferably in an external report, to make it easier to edit.

We add a dataset of the query type and write, either manually or using the query constructor, a simple query:

1. Set up a request in the ACS.

2. Setting up calculated fields in the ACS

3. We perform data composition setup on the settings tab

4. Launch 1C Enterprise 8.2.14. We open the report. We form, we get.

Description of the new functions themselves:

1. The current date()

Returns the system date. When the layout of the layout is linked, in all expressions that are present in the layout, the CurrentDate () function is replaced with the value of the current date.

2. CALCULATE EXPRESSION ()

Syntax:

Evaluate Expression (<Выражение>, <Группировка>, <ОбластьВычисления>, <Начало>, <Конец>, <Сортировка>, <ИерархическаяСортировка>, <ОбработкаОдинаковыхЗначенийПорядка>)

Description:

The function is intended for evaluating an expression in the context of some grouping.

The function takes into account the selection of groupings, but does not take into account hierarchical selections.

The function cannot be applied to a grouping in the group selection of this grouping. For example, in the selection of the Nomenclature grouping, you cannot use the expression CalculateExpression ("Sum (SumTurnover)", "TotalTotal")\u003e 1000. But such an expression can be used in a hierarchical selection.

If the end record precedes the start record, then it is considered that there are no records for calculating detailed data and calculating aggregate functions.

When calculating interval expressions for the grand total (the Grouping parameter is set to General Total), it is assumed that there are no records for calculating detailed data and calculating aggregate functions.

The layout composer, when generating an expression of the EvaluateExpression function, if the ordering expression contains fields that cannot be used in the grouping, replaces the EvaluateExpression function with NULL.

Options

<Выражение>

Type: String. The expression to evaluate.

<Группировка>

Type: String. Contains the name of the grouping in the context of which the expression is to be evaluated. If an empty string is used as a grouping name, the calculation will be performed in the context of the current grouping. If the GeneralTotal string is used as the grouping name, the calculation will be performed in the context of the grand total. Otherwise, the calculation will be performed in the context of the parent grouping with that name.

For example:

Amount (Sales.SumTurnover) / Calculate (“Amount (Sales.SumTurnover)”, “TotalTotal”)

In this example, the result will be the ratio of the amount for the Sales field.SumTurnover of the grouping record to the amount of the same field in the entire layout;

<ОбластьВычисления>

Type: String. The parameter can take the following values:

  • Total - the expression will be evaluated for all grouping records.
  • Hierarchy - the expression will be evaluated for the parent hierarchical record, if any, and for the entire grouping, if there is no parent hierarchical record.
  • Grouping - the expression will be evaluated for the current grouping grouping record.
  • GroupingNonResource - when evaluating a function for a group record by resources, the expression will be calculated for the first group record of the original grouping.

When calculating the function EvaluateExpression () with the GroupNoResource value for group records that are not grouped by resource, the function is calculated in the same way as it would be calculated if the parameter value was equal to Grouping.

The composer of the data composition template, when generating the data composition template, when outputting the resource-field by which the grouping is performed to the template, puts an expression calculated using the function EvaluateExpression (), specifying the GroupUnResource parameter. For the rest of the resources, the regular resource expressions are grouped by resource.

<Начало>

Type: String. Indicates with which record to start the fragment, in which to calculate the aggregate functions of the expression and from which record to get the values \u200b\u200bof fields outside the aggregate functions. The value can be one of the following:

<Конец>

Type: String. Indicates to which record to continue the fragment in which to evaluate the aggregate functions of the expression. The value can be one of the following:

  • First (First). You need to get the first grouping record. After the word in parentheses, you can specify an expression, the result of which will be used as an offset from the beginning of the grouping. The resulting value must be an integer number greater than zero. For example, First (3) - getting the third record from the beginning of the grouping.

If the first record is outside the grouping, then it is considered that there are no records. For example, if there are 3 records, and you want to get First (4), then it is considered that there are no records.

  • Last (Last). You need to get the latest grouping record. An expression can be specified after the word in brackets, the result of which will be used as an offset from the end of the grouping. The resulting value must be an integer number greater than zero. For example, Last (3) - getting the third record from the end of the grouping.

If the last record is outside the grouping limits, then it is considered that there are no records. For example, if there are 3 records, and you want to get the Last (4), then it is considered that there are no records.

  • Previous. You need to get the previous grouping record. An expression can be specified after the word in brackets, the result of which will be used as an offset back from the current grouping record. For example, Previous (2) - get the previous one from the previous record.

If the previous record goes beyond the grouping (for example, for the second grouping record you need to get Previous (3), then the first grouping record is obtained.

When retrieving the previous record for the grouping total, the first record is considered.

  • Next (Next). You need to get the next grouping record. An expression can be specified after the word in brackets, the result of which will be used as an offset forward from the current grouping record. For example, Next (2) - get next from next record.

If the next record goes out of the grouping, then it is considered that there are no records. For example, if there are 3 records and Next () is received for the third record, then there are no records.

When the next record is received for the grouping total, it is considered that there is no record.

  • Current (Current). You need to get the current record.

When retrieving for the grouping total, the first record is obtained.

  • BoundaryValue. The need to get a record at the specified value. After the word BoundedValue in parentheses, you need to specify the expression with the value of which you want to start the fragment, the first ordering field.

As a record, the first record will be obtained, the value of the ordering field of which is greater than or equal to the specified value. For example, if the Period field is used as the ordering field, and it has the values \u200b\u200b01/01/2010, 01/02/2010, 01/03/2010, and you want to get a BoundingValue (DateTime (2010, 1, 15)), then you will receive a record with the date 01.02. 2010.

<Сортировка>

Type: String. Lists expressions, separated by commas, that describe the ordering rules. If not specified, the ordering is performed in the same way as for the grouping for which the expression is evaluated. After each expression, you can specify the keyword Ascending (for ascending order), Descending (for descending order), and Auto-ordering (for ordering the referenced fields by the fields by which you want to order the referenced object). The word Autoorder can be used with both Ascending and Descending.

<ИерархическаяСортировка>

Type: String. Same as Sorting. Used to arrange hierarchical records. If not specified, the layout composer generates the ordering according to the ordering specified in the Sort parameter.

<ОбработкаОдинаковыхЗначенийПорядка>

Type: String. Specifies the rule for determining the previous or next record in case there are several records with the same ordering value:

  • Separately means that a sequence of ordered records is used to define the previous and next records. Default value.
  • Together means that the previous and next records are determined based on the values \u200b\u200bof the collation expressions.

For example, if the resulting sequence is ordered by date:

date Full name Value
1 01 January 2001 Ivanov M. 10
2 02 January 2001 Petrov S. 20
3 03 January 2001 Sidorov R. 30
4 04 January 2001 Petrov S. 40

If the parameter value is Separate, then:

The previous entry to entry 3 will be entry 2.

§ if the calculated fragment is defined as Current, Current (respectively, the Start and End parameters), then for record 2 this fragment will consist of one record 2. Expression Calculate Expression (“Sum (Value)”, Current, Current) will be equal to 20.

If the parameter value is Together, then:

The previous entry to entry 3 will be entry 1.

§ if the calculated fragment is defined as Current, Current (respectively, the Start and End parameters), then for record 2 this fragment will consist of records 2 and 3. Expression Calculate Expression (“Sum (Value)”, Current, Current) will be equal to 50.

When specifying the parameter value equal to Together, in the Start and End parameters you cannot specify an offset for the First, Last, Previous, Next positions.

Calculate Expression (“Sum (SumTurnover)”, “First”, “Current”)

If you want to get the grouping value in the previous line, you can use the following expression:

Evaluate Expression ("Course", "Previous")

List new functions:

EvaluateExpressionGroupedArray(<Выражение>, <ВыражениеПолейГруппировки>, <ОтборЗаписей>, <ОтборГруппировок>) –

The function returns an array, each element of which contains the result of evaluating the expression to be grouped by the specified field.

EvaluateExpressionGroupedValuesTable(<Выражения>, <ВыражениеПолейГруппировки>, <ОтборЗаписей>, <ОтборГруппировок>) –

The function returns a table of values, each row of which contains the result of evaluating expressions to group by the specified field

ValueFilled(<Выражение>) - Returns True if the value is different from the default of the given type, other than NULL, other than an empty reference, other than Undefined. For Boolean values, a null check is performed. For strings, it is checked for the absence of non-whitespace characters

Format(<Выражение>, <Форматная строка>) - Get the formatted string of the passed value. The format string is set in accordance with the format string of the 1C: Enterprise system.

Substring(<Выражение>, <Начальные символ>, <ДлинаПодстроки>) - This function is designed to extract a substring from a string.

Line Length(<Выражение>) - The function is designed to determine the length of the string. Parameter is a string type expression

Line(<Выражение>) - If an array is passed as a parameter, the function returns a string containing string representations of all array elements, separated by symbols “; “. If a table of values \u200b\u200bis passed as a parameter, the function returns a string containing string representations of all rows of the table of values, and the cell representations of each row are separated by “; “, And strings - with a line feed character. If any element has an empty string representation, the string is displayed instead of its representation<Пустое значение>.