the Internet Windows Android

Data layout system 1C 8.3 Calculated fields. Functions of the language of expressions of the data layout system

Sign in as a student

Log in as a student to get access to the materials of the school.

Data layout system 1C 8.3 for beginners: We consider the results (resources)

The purpose of this lesson will be:

  • Write a report that displays a list of products (Food Directory), their calorie and taste.
  • Make product grouping in their color.
  • Get acquainted with the possibility of summing up (resources) and calculated fields.

Create a new report

As in previous lessons open the database " Deli"In the configurator and create a new report through the menu" File"->"New...":

Document type - external report:

In the form of a report configuration I write a name " Lesson3."And press the button" Open the data layout scheme":

Leave the default schema name and press the button. Ready":

Add a request through the designer

On the tab " Data set"Press greenplusik and choose the item " Add Data Set - Request":

Instead of writing the text of the query manually, run again request Designer:

On the tab " Tables"Treat the table" Food"From the first column to the second:

Choose from the table " Food"Fields that will request. To do this, drag the fields" Name", "Taste", "Color"And" Calorie"From the second column to the third:

It turned out like this:

Press the button " OK"- the query text has been formed automatically:

We form a report presentation settings

Go to the bookmark " Settings"And click on Magic wand, to call designer settings:

We choose the view of the report " List... "and press the button" Further":

Drag out from the left column to the right fields to be displayed in the list and click " Further":

Drag out from the left column to the right field " Color"- on it will happen grouping Lines in the report. Click " OK":

And here is the result of the designer's work. Hierarchy of our report:

  • Report in general
  • Grouping "Color"
  • Detailed entries - rows with food names

Save the report (button diskette) I. not closing The configurator will immediately open it in user mode. It turned out like this:

Change the order of speakers

But let's change order Columns (up-down arrows) so that it is like in the figure below:

Save the report and re-operate in user mode:

Great, so much better.

Summarize (sum) by calories

It would be nice to withdraw the result of calorie products by groups. To see the sum of the caloric content of all products, say, white or yellow color. Or find out the common calorie content of all products in the database.

For this, there is a mechanism for calculating resources.

Go to the tab " Resources"And dragging the field" Calorie"(We are going to sum up on it) from the left column to the right.

In this case, select the expression field from the drop-down list. " Amount (calorie)"As the result will be the sum of all elements in the total:

We save and form a report:

We have the results of each of the groups and on the report as a whole.

Summing outcome (average) by calories

Now let's make it so that in another column output average Calorie products for groups and in general on the report.

To touch the existing column "Calorie" is impossible - it is already displayed in it, therefore start another fieldwhich will be an exact copy of the "Calorie" field.

To start such a "virtual" field we use the mechanism field calculated.

Go to the bookmark " Calculated fields"And click greenplusik:

In a collumn " Data Path"We write the name of the new field ( ply, without spaces). Let it be called " High Calority", and in the column" Expression"We write the name of an existing field, on the basis of which the new field will be calculated. We write there" Calorie". Column " Title"Fill automatically.

We added a new field (" High Calority"), but in the report it will not appear in itself - you need to call again designer settings ("Magic wand") or add this field manually.

Receive second way. To do this, go to the bookmark " Settings", choose" Report"(After all, we want to add the field as a whole to the report), choose the bookmark below Selected fields"And dragging the field" High Calority"From the left column to the right:

It turned out like this:

We save and form a report:

The field appeared and we see that its values \u200b\u200bare the values \u200b\u200bof the "Calorier" field. Excellent!

To do this, we will again use the mechanism already familiar to us. resources (summarizing). Go to the bookmark " Resources"And dragging the field" High Calority"From the left column to the right:

At the same time in the column " Expression"Choose" Average (average Calority)":

We save and form a report:

We see that in groups, that is, for each color, and on the report as a whole, the average value was completely correct. But are present unnecessary entries According to individual products (not by groups), which I would like to remove from the report.

Do you know why they appeared (not in groups)? Because when we added the field " High Calority"In the report settings, we allocated in the second step the entire report in general And this new field fell into the element " Detailed entries".

Let's fix the error. To do this back to the bookmark " Settings", choose" Detailed entries"First from above (step 2), and then" Detailed entries"Bottom (step 3), let's get on the bookmark" Selected field"And we will see the element in its right column" Auto".

Element " Auto"- This is not one field. These are several fields that come here automatically based on higher settings.

To see what kind of fields - click on the item " Auto" right button and choose the item " Expand":

Element " Auto"revealed to the following fields:

And here and our field " High Calority", which came here from the point" Report"When we dragged him there. Just slimming Galka next to this field to remove his output.

Language of expressions of the data layout system

The data layout expressions language expressions are designed to record expressions used in different parts of the system.

Expressions are used in the following subsystems:

  • data layout diagram - to describe the calculated fields, results of results, communication expressions, etc.;
  • data layout settings - To describe user field expressions;
  • data layout layout - to describe the communication set expressions, describing the parameters of the layout, etc.

Literal

The expression may have literals. The following types are possible:

  • Line;
  • Number;
  • Date;
  • Booleo.

Line

The string literal is written in the characters "", for example:

"Stroke literal"

If you need to use inside the string literal of the "" symbol, two such characters should be used.

For example:

"Literal" "in quotes" ""

Number

The number is written without spaces, in decimal format. The fractional part is separated using the symbol ".". For example:

10.5 200

date

Date type literal is written using a dattime key literal. After this keyword, in brackets, a year, month, day, hours, minutes, seconds are listed through commas. An indication of time is not necessary.

For example:

Datastern (1975, 1, 06) - Sixth January 1975 Datastern (2006, 12, 2, 23, 56, 57) - second December 2006, 23 hours 56 minutes 57 seconds, 23 hours 56 minutes 57 seconds

Boolean

Boolean values \u200b\u200bcan be recorded using truth literals (TRUE), Lies (FALSE).

Value

To specify literals of other types (system enumerations, predefined data) used keyword The value after which the literal name is indicated in brackets.

Meaning (VIDCET. Active)

Operations on numbers

Unary -

This operation is designed to change the sign of the number to the opposite. For example:

Sales. Nationality

Unary +.

This operation does not perform any actions above the number. For example:

Sales. Nationality

Binary -

This operation is designed to calculate the difference in two numbers. For example:

Residual feuds. Proprietary resistant - residuals. Concentrate residual residues. Protective, 100 400 - 357

Binary +.

This operation is intended to calculate the sum of two numbers. For example:

Residual feuds. Proprietary + residual feuds. Turnover residibles. Protecting. + 100 400 + 357

Composition

This operation is designed to calculate the work of two numbers. For example:

Nomenclature. Price * 1.2 2 * 3.14

Division

This operation is designed to obtain the result of dividing one operand to another. For example:

Nomenclature. Price / 1.2 2 / 3.14

Remainder of the division

This operation is designed to obtain a balance from dividing one operand to another. For example:

Nomenclature. Price% 1.2 2% 3.14

Operations on strings

Concatenation (binary +)

This operation is designed to concatenate two lines. For example:

Nomenclature.Article + ":" + Nomenclature. Name

Like

This operation checks the correspondence of the string transmitted pattern.

The valid of the operator is true if the value is<Выражения> Satisfies the template, and false otherwise.

The following characters B.<Строке_шаблона> make sense, different from simply another string symbol:

  • % - percentage: a sequence containing zero and more arbitrary characters;
  • _ - underscore: one arbitrary symbol;
  • [...] - one or more characters in square brackets: one character, any of the listed in square brackets. The lists may occur the ranges, for example A-Z, meaning an arbitrary symbol included in the range, including the ends of the range;
  • [^ ...] - In square brackets, the denial icon, followed by one or more characters: any character, except those listed in the negative icon;

Any other character means itself and does not carry any additional load. If one of the listed characters should be written as itself, then he must precede<Спецсимвол>, Specified after the keyword Special Milk (Escape).

For example, template

"% ABB [ABBG] \\ _ ABV%" Specialsimol "\\"

means a substring consisting of a sequence of symbols: letters A; letters b; letters in; one digit; one of the letters a, b, in or g; Stress symbol; Letters A; letters b; letters in. Moreover, this sequence can be located starting from an arbitrary position in the string.

Operations of comparison

Equally

This operation is intended to compare two operands per equality. For example:

Sales. Contrgent \u003d Sales. Nomelaclatura-binding

Not equal

This operation is designed to compare two operands for inequality. For example:

Sales. Kontragent<> Sales. Nomelaclatura-binding

Less

This operation is designed to verify that the first operand is less than the second. For example:

Surgious< ПродажиПрошлые.Сумма

More

This operation is designed to verify that the first operand is greater than the second. For example:

Surgious. Summum\u003e Said. Summum

Less or equal

This operation is designed to verify that the first operand is less or equal to the second. For example:

Surgious<= ПродажиПрошлые.Сумма

More or equal

This operation is designed to verify that the first operand is more or equal to the second. For example:

For sale. Masm: \u003d Said. Summary

Operation B.

This operation checks the availability of the value in the transmitted list of values. The result of the operation will be true, in case the value is found, or false - otherwise. For example:

Nomenclature in (& product11, & product2)

Operation check availability in the data set

The operation checks the availability of the value in the specified data set. Data set to check should contain one field. For example:

Sales. Contrgent in counterparties

Value check operation on NULL

This operation returns the value of truth if the value is the value of NULL. For example:

Sales. The progengerant is NULL

Operation verification value for NULL inequality

This operation returns the value of the truth in case the value is not the value of NULL. For example:

Selling. The control agent is not NULL

Logical operations

Logical operations are taken as an expression operands having a type of Boolevo.

Operation ne.

The operation does not return the value of the truth if its operand is set to false, and the value is false if its operand is of the value of truth. For example:

NOT DOCUMENT. Fragment of the program. Document.

Operation I.

Operation and returns the value of the truth if both operands are of the value of the truth, and the value is false if one of the operands matters a lie. For example:

Document. Framed document \u003d Document. Underwriter and Document. Contractor \u003d & Contract

Operation or

Operation or returns the value of truth if one of the operands is the value of truth, and a lie in case both operands are valid. For example:

Document. Framed \u003d Document. A loader or document. Fragmentist \u003d & counterpart

Aggregate functions

The aggregate functions carry out some action above the data set.

Sum

The aggregate function amount calculates the amount of values \u200b\u200bof expressions transmitted to it as an argument for all detailed records. For example:

Amount (Sales. Summary)

number

The function number calculates the number of values \u200b\u200bother than NULL values. For example:

Quantity (sale. Contrgent)

Number of different

This feature calculates the number of different values. For example:

Quantity (various sales. Control agent)

Maximum

The function gets the maximum value. For example:

Maximum (residues. Nality)

Minimum

The function gets the minimum value. For example:

Minimum (residue. Nality)

Average

The function gets an average value for values \u200b\u200bother than NULL. For example:

Average (residues. Nality)

Other operations

Operation Selection

Operation The selection is intended to select one of several values \u200b\u200bwhen performing certain conditions. For example:

Selection when the sum\u003e 1000 then the sum otherwise 0 end

Rules for comparing two values

If the types of compaable values \u200b\u200bdiffer from each other, the relationship between values \u200b\u200bare determined based on the priority of types:

  • NULL (the lowest);
  • Boolean;
  • Number;
  • Date;
  • Line;
  • Reference types

Relations between different reference types are determined on the basis of reference numbers of tables corresponding to this or another type.

If the data types are the same, the values \u200b\u200bare compared to the following rules:

  • at the boolean type, the value of the truth is greater than the value of false;
  • at the number of the usual comparison rules for numbers;
  • at the type of earlier dates less than later;
  • at the line type - comparison of rows in accordance with the established national database features;
  • reference types are compared based on their values \u200b\u200b(recording numbers, etc.).

Work with NULL

Any operation in which the value of one of the NULL operands will give the NULL result.

There are exceptions:

  • operation and will return NULL only if none of the operands matters a lie;
  • operation or will return NULL only if none of the operands do not matter the truth.

Priorities of operations

Operations have the following priorities (the first line has a lower priority):

  • B, there is NULL, there is not null;
  • =, <>, <=, <, >=, >;
  • Binary +, binary -;
  • *, /, %;
  • Unary +, unary -.

Functions of the language of expressions of the data layout system

Calculate

The Function is intended to calculate the expression in the context of some grouping. The function has the following parameters:

  • Expression. String type. Contains a calculated expression;
  • Grouping. String type. Contains the name of the group, in the context of which it is necessary to calculate the expression. If an empty string is used as a group name, the calculation will be executed in the context of the current grouping. In the event that a number of common groups will be used as a group of grouping, the calculation will be executed in the context of the total result. In other cases, the calculation will be performed in the context of the parent group with the same name. For example:
Amount (sales. Masmoboto) / Calculate ("Amount (Sales. Summary)", "Obnutogit")

IN this example As a result, the ratio of the amount on the "Safe-turn" field of the grouping to the sum of the same field in the entire layout is obtained.

Level

The function is designed to obtain the current recording level.

Level()

Self-order

Get the next sequence number.

Self-order ()

The number is in order

Returns the next sequence number in the current grouping.

Callergling group ()

Format

Get the formatted string of the transmitted value.

The format string is set in accordance with format string 1C: Enterprise.

Parameters:

  • Value;
  • Format string.

Format (expendable value. Summaging, "CDC \u003d 2")

Beginning of period

Parameters:

    • Minute;
    • Day;
    • A week;
    • Month;
    • Quarter;
    • Decade;
    • Half year.

Starteriod (Datastern (2002, 10, 12, 10, 15, 34), "Month")

Result:

01.10.2002 0:00:00

Ending End

The function is designed to highlight a specific date from a given date.

Parameters:

  • Date. Type date. Specified date;
  • Type of period. String type. Contains one of the values:
    • Minute;
    • Day;
    • A week;
    • Month;
    • Quarter;
    • Decade;
    • Half year.

Ending Extruder (Datastern (2002, 10, 12, 10, 15, 34), "Week")

Result:

13.10.2002 23:59:59

Add space

The function is designed to be added to the date of some size.

Parameters:

  • Type of magnification. String type. Contains one of the values:
    • Minute;
    • Day;
    • A week;
    • Month;
    • Quarter;
    • Decade;
    • Half year.
  • The value is how much you need to increase the date. Type number. The fractional part is ignored.

Add space (Datastern (2002, 10, 12, 10, 15, 34), "Month", 1)

Result:

12.11.2002 10:15:34

DIVISSION

The function is designed to obtain a difference between two dates.

Parameters:

  • Expression. Type date. Source date;
  • Expression. Type date. Submitted date;
  • Type of difference. String type. Contains one of the values:
    • Second;
    • Minute;
    • Day;
    • Month;
    • Quarter;

Distribution (Datastern (2002, 10, 12, 10, 15, 34), Datastern (2002, 10, 14, 9, 18, 06), "Day")

Result:

Substring

This feature is designed to highlight the substring from the line.

Parameters:

  • Line. String type. The string from which is distinguished by a substring;
  • Position. Type number. The position of the symbol from which the substring allocated from the line begins;
  • Length. Type number. The length of the secreted substring.

Substring (counterparties. Press, 1, 4)

Flat stroke

The function is designed to determine the length of the string.

Parameter:

  • Line. String type. Row, the length of which is determined.

String (counterparties. Press)

Year

This feature is designed to highlight the year from the date value.

Parameter:

  • Date. Type date. The date for which the year is determined.

Year (Dat)

Quarter

This feature is intended to highlight the quarter number from the date type value. The quarter number is normal located in the range from 1 to 4.

Parameter

  • Date. Type date. Date on which the quarter is determined
Quarter (Rask'dat)

Month

This feature is intended to highlight the number of the month from the date type value. The number of the month is normally located in the band-zone from 1 to 12.

  • Date. Type date. The date on which the month is determined.
Month (Dat)

Money

This feature is designed to receive the day of the year from the type of date. The day of the year is normal in the range from 1 to 365 (366).

  • Date. Type date. The date for which the day of the year is determined.
Money (Rask Data)

Day

This feature is designed to receive a day of the month from the type of date. The day of the month is normally in the range from 1 to 31.

  • Date. Type date. The date on which is determined by the day of the month.
Day (Dat)

A week

This feature is designed to receive the number of the year of the year from the date type value. The weeks of the year are numbered, starting from 1.

  • Date. Type date. Date on which the number of the week is determined.
Week (RaskAkl. Data)

Doubleded

This feature is designed to receive the day of the week from the type of date. The day of the week is normally in the range from 1 (Monday) to 7 (Sunday).

  • Date. Type date. Date on which the day of the week is determined.
Doubleded (RaskAkl. Data)

Hour

This feature is designed to obtain an hour of day from the type of date. An hour of day is in the range from 0 to 23.

  • Date. Type date. The date for which the hour of day is determined.
Hour (Rask Tat)

Minute

This feature is designed to obtain a minute of an hour from the type of date. A minute of an hour is in the range from 0 to 59.

  • Date. Type date. The date on which is determined by a minute of hours.
Minute (RaskAkl. Data)

Second

This function is designed to get a second minute from the date type value. The second minute is in the range from 0 to 59.

  • Date. Type date. Date on which seconds are defined minutes.
Second (Dat)

Express

This function is designed to highlight the type from an expression that can contain composite type. In case the expression contains a type other than the required type, the value of NULL will be returned.

Parameters:

  • Transformed expression;
  • Note type. String type. Contains type string. For example, "number", "string", etc. Besides primitive types this line May contain a table name. In this case, an attempt will be made to refer to the link to the specified table.

Express (data. Required1, "Number (10.3)")

Naull

This function returns the value of the second parameter in the case if the value of the first NULL parameter.

Otherwise, the value of the first parameter will be returned.

There isnull (Amount (Sales. Summary), 0)

Functions of common modules

The expression of the data layout mechanism may contain calls for global functions. common modules Configuration. No further syntax for calling such functions is not required.

This example will be called the "Abbreviation" function from the general configuration module.

Note that the use of common module functions is allowed only when specifying the corresponding data layout processor parameter.

In addition, the functions of common modules cannot be used in user field expressions.

Computing Execution - A rather complicated function of the CCD for understanding, and examples of application in reference information are quite scarce. This article discusses examples that will certainly be useful to each developer:

  1. growing up in grouping;
  2. the growing outcome in the cross-table;
  3. obtaining the previous value;
  4. tC output in one line.

1. Obtaining an indicator with a growing outcome

We receive the amount of goods by a growing outcome at the group level. To do this, create a calculated field (see Figure 1).
On the Resources tab, you specify the function for the calculated field:
Calculating Execution ("Amount (Whether", "First", "Current")
which will summarize the amount of goods from the first record to the current (see Figure 2).

If the number of goods with a growing outcome is required at the level of detailed records, then the function of the calculating function is specified for the calculated field on the Computable Fields tab (see Figure 3).
Depending on the level of obtaining a growing result, we create a grouping (see Figure 4): at the level of resources - grouping by goods, at the DZ level - grouping of detailed records.
Figure 4. Report groupings with a growing result

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

We receive a currency exchange rate on the date and the previous date. To do this, create a calculated field and in the expression field we write the following expression (see Figure 5):
Computing Execution ("Course", "Previous", "Previous")
which will take the previous value of the currency rate for current line, The last parameter of the function limits data receiving.
Since we work at the level of detailed records, we immediately go to the "Settings" tab and create a grouping - detailed records.

3. Obtaining an indicator with a growing outcome in the cross-table

We obtain the amount of goods by the growing result in the context of the period. To do this, create a calculated field (see Figure 1). On the Resources tab, for the calculated field, indicate the following expression (see Figure 6):
Calculating Execution ("Amount (Whether", "Period", "First", "Current")
Which at the level of the grouping will calculate the amount of goods in the interval from the first line to the period flowing in the context of each nomenclature.
On the Settings tab, we create a table with a grouping on the nomenclature in the string and grouping along the period in the column (see Figure 7).

4. Data output tabular part in one line

Methods for outputting data tabular part in one line, including the method using the calculating function, is considered in the article.

In the next exit 8.2.14, I will try to describe some new features of the data layout system.

Open the data layout circuit, preferably in the external report so that it is easier to edit.

Add a set of type data type and write, or manually, either using the query constructor the simplest query:

1. Configure the request to the LCD.

2. Customize the calculated fields in the CD

3. Perform the data layout setting on the Settings tab

4. Run 1C enterprise 8.2.14. Open a report. We form, we get.

Description of the new features themselves:

1. The current date()

Returns the system date. When laying a layout layout in all expressions that are present in the layout, the flow function () is replaced by the value of the current date.

2. Calculate system ()

Syntax:

Calculating Education (,)

Description:

The function is designed to calculate the 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 the grouping in the group selection of this grouping. For example, in the selection of grouping, the nomenclature cannot be used expression Calculating Execution ("Amount (Size Layer)", "Obnutitog")\u003e 1000. But such an expression can be used in a hierarchical selection.

If the final record is preceded by the initial, it is believed that the records for calculating the detailed data and the calculation of aggregate functions are absent.

When calculating the interval expressions for a common result (the grouping parameter matters a common value) it is believed that there are no records for calculating the detailed data and the calculation of aggregate functions.

Layout layout when generating function expression Computing ExecutionIn the event that the ordering expression contains fields that cannot be used in grouping, replaces the function Computing Execution on the NULL.

Parameters

A type: Line. The expression that must be calculated.

A type: Line. Contains the name of the group, in the context of which it is necessary to calculate the expression. If an empty string is used as a group name, the calculation will be executed in the context of the current grouping. In the event that a number of common groups will be used as a group of grouping, the calculation will be executed in the context of a total result. In other cases, the calculation will be performed in the context of the parent group with the same name.

For example:

Amount (sales. Masmoboto) / Calculate ("Amount (Sales. Summary)", "Obnutogit")

In this example, the result is the ratio of the amount on the field Sales. Summary recording grouping to the sum of the same field in the whole layout;

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

· The overall result - The expression will be calculated for all grouping records.

· Hierarchy - The expression will be calculated for the parent hierarchical record, if any, and for the whole grouping, if the parent hierarchical record is not available.

· Grouping - The expression will be calculated for the current group recording.

· GroupingResource - When calculating a function for group recording on resources, the expression will be calculated for the first group recording of the original grouping.

When calculating the function Calculate system () with meaning GroupingResource For group entries that are not groups for resources, the function is calculated in the same way as it would be calculated if the parameter value was equal to the value Grouping.

Data layout layout layout when generating a layout of data layout when displaying a field-resource layout, which is performed by a grouping, places an expression on the layout calculated using a function Calculate system () , indicating the parameter GroupingResource. For other resources, ordinary resource expressions are placed in the resource grouping.

A type: Line. Indicates which record you need to start a fragment in which to calculate the aggregate functions of the expression and from which record to receive field values \u200b\u200boutside the aggregate functions. The value may be one of the following:

· First (FIRST)

· Last (Last)

· Previous (Previous)

· Next

· Current (Current)

· Restricted (BoundaryValue) Restricted

A type: Line. Indicates, to which record you need to continue a fragment in which to calculate the aggregate expression functions. The value may be one of the following:

· First (FIRST). You must receive the first group entry. After the word in brackets, you can specify the expression whose result will be used as a shift from the beginning of the group. The value obtained should be integer to be a number, more zero. For example, the first (3) - receiving the third entry from the beginning of the grouping.

If the first record goes beyond the grouping, it is believed that there are no records. For example, if the records 3, and it is required to get the first (4), it is believed that there are no records.

· Last (Last). You need to get the latest entry of the grouping. After the word in brackets, you can specify the expression whose result will be used as a shift from the end of the grouping. The value obtained should be integer to be a number, more zero. For example, the last (3) is to receive a third entry from the end of the grouping.

If the last record goes beyond the grouping, it is believed that there are no records. For example, if records 3, and it is required to get the last (4), it is believed that there are no records.

· Previous (Previous). You need to get the previous grouping record. After the word in brackets, you can specify the expression whose result will be used as an offset back from the current grouping entry. For example, the previous one (2) is obtaining the previous one from the previous record.

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

Upon receipt of the previous recording, the first entry is considered for the group.

· Next. You need to get the following grouping. After the word in brackets, you can specify the expression whose result will be used as a shift forward from the current grouping entry. For example, the following (2) is obtaining the following from the next entry.

If the next entry goes beyond the grouping, it is believed that there are no records. For example, if the records 3 and for the third record are obtained as follows (), it is considered that there are no records.

Upon receipt of the next record for the summary of the grouping it is believed that there are no records.

· Current (Current). You need to get the current entry.

Upon receipt for the sum of grouping, the first record is obtained.

· Restricted (BoundaryValue). Need to get a record at the specified value. After the word Restricted In brackets you need to specify the expression, with the value of which you need to start a fragment, the first ordering field.

The first record will be received as an entry, the ordering field value in which is greater than or equal to the specified value. For example, if the field is used as a field of ordering, and it matters 01/01/2010, 01.02.2010, 01.03.2010, and you need to get Restricted (DATEVERY (2010, 1, 15)), I will receive a record with the date 01.02.2010.

A type: Line. Expressions are listed, separated by commas, which describe the ordering. If not specified, the ordering is performed as well as in the grouping for which the expression is calculated. After each expression, you can specify a keyword CZ (for ordering ascending), Descending (for ordering in descending) and Auto-order (To streamline references in the fields for which you need to organize an object to which the link is performed). Word Auto-order can be used as with the word CZand with the word Descending.

A type: Line. Similar to the parameter Sorting. It is used to streamline hierarchical records. Unless not specified, the layout layout generates an ordering in accordance with the ordering specified in the parameter Sorting.

A type: Line. Specifies the definition rule of the previous or the next entry in case there are several entries with the same meaning ordering:

· Separately (separately) Indicates that to determine the previous and next records, the sequence of ordered records is used. The default value.

· Together (TOGETHER) Indicates that the previous and the following entries are determined based on the values \u200b\u200bof arrange expressions.

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

date Full name Value
1 January 01, 2001

Ivanov M.

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

Separately, then:

§ Previous recording to write 3 will be recording 2.

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

If the value of the parameter is equal Together, then:

§ Previous recording to recording 3 will be record 1.

§ if the calculated fragment is defined as Current, current (respectively, parameters Start and the end), then for recording 2, this fragment will consist of recording 2 and 3. Expression Calculating expectation ("Amount (value)", current, current) It will be 50.

When specifying the value of the equal parameter Together, in parameters Start and the end You can not specify the offset for positions First, last, previous, next.

Calculating Execution ("Amount (Size Layer)", "First", "Current")

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

Computing Execution ("Course", "Previous")

List new Functions:

Calculate WasteReisibrouproupsOmassive(,) -

The function returns an array, each element of which contains the result of calculating the expression for grouping by the specified field.

Calculating / separationGroupsCountries(,) -

The function returns the table of values, each line of which contains the result of calculating expressions for grouping by the specified field

The value is filled() - returns truth if the value is different from the value this type By default, it is different from the value of NULL, excellent from an empty link, is different from the value uncertain. For logical values, an NULL value is checked. For strings, checks on the absence of not space characters

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

Substring(,,) - This function is designed to highlight the substring from the row.

Flat stroke() - The function is designed to determine the length of the string. Parameter - String Expression

Line() - If an array is transmitted as a parameter, then the function returns a string containing string representations of all array elements separated by symbols ";". If the value table is transmitted as a parameter, then the function returns a string containing the string representations of all rows of the values \u200b\u200bof the values, and the samples of each string are separated by symbols ";", and the strings - the limit of the row translation. If a string representation is empty in any element, the string is displayed instead of its presentation.

One of the most convenient and unique development tools in 1C is the data layout system (CCD). Little in any information systems Developers can create reports without writing a program code. This mechanism was developed in order to simplify and speed up the development of reporting forms and give more opportunities to users in working with data deposited. The latter is very highly appreciated by advanced users who, thanks to this, can independently configure the report for their own needs, not expecting the actions of the developers.

Creating a report in 1C through SKD

The process of developing a report using the CCD can be divided into the following steps:

  1. Creating a query. You can write a request manually or do without a program code, using a convenient interface;
  2. Setting the report. Selects fields, results, groupings, parameters, report design;
  3. After that, we will only have to connect the resulting report to the configuration in any available way.

Despite the ability of users to configure reports on the CCD, it is necessary to create them through the configurator.

Consider an example of creating external report at SKD:


Now go to 1C, open our report to make sure the correctness of the perfect actions. Data all reflected, groupings can be folded and deployed. As you can see, the CCD allows you to receive full-fledged reports without writing code except for non-standard requirements. Given that most reports have a similar structure, the knowledge of the CCM will significantly reduce the time for the development of these objects.

This mechanism has provided support for extensive opportunities in the formation of a report. And not only developers can use them, but also simple users.

OPPOSSIONS OF SCD

There are situations where we made a report, and then the user comes and asks to make a small refinement. For example, instead of names of the nomenclature, withdraw the articles. The CCD allows such modifications to make users themselves using the "More" button - "change the option ...".


The window that opened is similar to the Settings window in the report in the configurator, as well as it has similar functions. To solve the task, the user must go to the "Fields" tab and change the "Nomenclature" field. This editing field opens with a double click, and the "Select ..." button becomes available.


The window that opened provides us with the possibility of choosing any value that will appear in the "Nomenclature" field. Some fields on the left appears the plus sign - in these fields, the developer placed the links, it means that we can see their details. We reveal the "nomenclature" and see the article that we need. We highlight it and choose.


In the change window, many of the report options are laid useful functions Data layout systems. For example, the user can independently change the order of groupings, add the selection or impose conditional design. Complete editing and form a report - as we see, the whole nomenclature is now displayed in the form of articles.


CCC mechanism 1C: Enterprise 8.3 also has an extended functionality for developers. When developing a report, we used only 2 tabs - "Data sets" and "settings", but there are much more in the LCD. To enjoy all the functions of the data layout system, you must represent, for which each of the tabs are needed:

  1. Data sets - all requests involved in the formation of the report are listed here;
  2. Data set communication - used to build communication between different requests from the first tab;
  3. Calculated fields - a list of added fields not from request. Most often used in cases when on the basis of the values \u200b\u200bof several fields from the query you need to get 1 value;
  4. Resources. In 1c, the following fields for which you need to know the results. Resources support various arithmetic operations - the amount, number, maximum and others;
  5. Parameters. Used if it is necessary for the report to form a report so that the user enters certain data - date, units or the nomenclature, for example;
  6. Layouts. Designed for those cases when users want to see a uniquely decorated report. Create a separate place for signatures or a new top of the report - all this can be here;
  7. Nested schemes. They are needed when your report must contain other reports;
  8. Settings. The section is announced by the displayed fields, grouping, configured appearance Report.


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