Documents, accumulation registers, storage systems. Revolving accumulation register “Sales 1c 8 3 create accumulation registers

To reflect various business transactions in programs based on 1C:Enterprise, users use documents. From them you can obtain all the necessary data, for example, on cash balances in the company’s accounts, the number of goods sold over a certain period of time.

During the work process, there may be quite a large number of such documents. Here we are not talking about hundreds of documents, but about thousands and tens of thousands. Naturally, building reports and other data from such a number of documents is very long, labor-intensive and ineffective.

Just imagine that when registering the sale of a product, an accountant sits and waits while the program checks the previously entered documents and calculates whether there is enough balance in the warehouse to write off.

To solve such problems in 1C there are special configuration objects - accumulation registers. When documents are processed, entries are made in them, and only then from these registers you can quickly obtain all the necessary data, including balances and turnover. That is, accumulation registers not only store data, but also allow them to be quickly processed.

As mentioned earlier, accumulation registers can allow balances and turnovers to be quickly retrieved. This functionality is directly related to the register type. It can be changed on the “Basic” tab of the specific register editing form.

  • Circulating accumulation registers allow you to obtain only turnover for a certain period of time. In this case, it is not possible to obtain balances. An accumulation register with the “Turnover” view creates only one virtual table in the system - turnover.
  • Accumulation registers with the “Remains” view enable the developer to obtain both balances and turnover. In this case, three virtual tables will be created: balances, turnovers, balances and turnovers. An example of such a register could be a register of inventory balances in warehouses and cash flows through the organization’s current accounts.

note that, despite the universality of the register of balances in receipt and balances and turnover, it also has its drawbacks. When obtaining revolutions in the balance register, productivity decreases significantly. In this regard, it is highly not recommended to use the balance register in cases where you only need turnover (for example, sales turnover). You should not set the register type to residuals “just in case”, because registers are designed to speed up the program, but on the contrary, you will slow down this process.

Accumulation register data

Measurements

Measurements of accumulation registers mean certain sections in which you can later obtain information. In our case, the dimensions of the “Product Output” register are: organization, order, specification, division and others.

At any time we will be able to receive balances, for example, for the entire organization as a whole, for a specific order.

Dimension Properties

Each dimension has its own set of properties that can significantly affect the operation of the register as a whole. Similar properties are also present in resources with details.

In the event that you plan to select in the future quite often for any dimension. In our case, we will not use indexing for the organization.

You can also specify here whether the dimension is mandatory, whether full-text search should be used, and other settings.

Resources

The resources are numerical data that stores certain information. This is what we will receive in various sections in the future. For example, in the accumulation register “Product Output”, only quantity will act as a resource. In this case, we will be able to obtain the quantity of products produced at a certain point in time, for example, for a certain division.

Another simple example. Let's assume that we carry out all cash transactions using the accumulation register. The resources will be the amount of money that was either received (receipt) or issued (expense) from the cash register. The dimension can be, for example, a counterparty/accountable person. As a result, we will be able to obtain data on balances and turnover of both the cash register as a whole and for individual counterparties.

Requisites

Unlike dimensions and resources, attributes are not used as often. They store the data that is needed to inform the register (note). Data will be used as attributes if it is neither a resource nor a dimension.

Standard details

In addition to the usual details that the developer can add independently, there are also standard details. You cannot delete or add new ones to this list. You can go to the standard details using the button of the same name on the “Data” tab.

Aggregates

Aggregates are available only in accumulation registers with the “Turnover” view. You can access them from the “Data” tab. Aggregates are used in databases with a large amount of data to speed up the generation of reports. We will not consider this mechanism in detail, since this is a fairly broad topic.

Movements in accumulation registers

Any accumulation register can have one or several registrars. A document acts as a registrar, during which a corresponding entry is generated in the accumulation register.

You can view the list of accumulation registrars on the tab of the same name in the form of the register itself. In this example, movements in the “Product Release” register can be generated when posting four different documents.

In the documents themselves, which are registrars, the list of registers by which they make movements is located on the “Movements” tab. A movement constructor is also available here, which will help in creating such procedures (carrying out and undoing). The comparison of document and register data is made by comparing data types.

the cost of the materials available in the organization, we will need to access the documents, look through each of them, writing out the necessary data, and then summarize them, obtaining the necessary data. This approach is inconvenient - it is too slow both for our imaginary “manual” case and for automated accounting.

It would be more logical, in addition to documents, to keep special tables in which, when receiving materials and when writing them off, to enter brief information about this. If, say, on a daily basis, you summarize these tables and display the remaining materials, then, in order to say how much and what materials the organization has on a certain date, it is enough to refer to the corresponding column of the table. In the 1C:Enterprise system, such tables are accumulation registers. As the name suggests, they are designed to reflect, accumulate, and certain indicators. And reflection in the registers of receipt and consumption of materials is one of the typical examples of their use.

Our organization keeps records of materials in connection with the responsible persons who receive them and from whom these materials are written off when released into production. We need to store information about the quantity of materials and their cost, and also, when written off for production, have information about which particular craftsman these materials were transferred to. These considerations allow us to design the structure accumulation register, which we will now create.

When planning a squad accumulation register we need to understand exactly what data we are going to store in it, and then “decompose” this data into dimensions, resources and register details.

So, we need to store the following data:

  • Nomenclature position
  • Responsible employee for this position
  • Quantity of items
  • Item cost
  • Data about the master to whom the materials were transferred for use.

Register measurements, or the cuts in which data is stored, allow us to answer questions about what data is stored in the ledger. In our case, we need to know two main characteristics - this is what responsible person fixed one way or the other nomenclature item. Obviously, the dimensions from our data list will be item item and responsible employee.

Registry Resources– these are always numerical values ​​characterizing the stored data. Numerical values ​​are quantity and sum, and they will be the resources of our register.

Register details play a supporting role, and, in our case, it would be logical to store in the register details information about the craftsman who received the materials for the work - in case we need to find out who exactly used these materials.

Another important question to decide when designing a register is whether the register will balance register or revolution register. We are interested in both information about the remaining materials and information about turnover, so when setting up the register, we should specify the type of register - Leftovers. Register with a view Leftovers allows us to work with both balances and turnover

The structure proposed here accumulation register– this is just one of the options for how to organize the storage of the described data. Such an accounting scheme can be implemented, say, using a pair of registers, one of which is used exclusively for the purpose of storing the total balances of materials - that is, the data that is needed for financial reports, the other - for storing data on responsibility centers. In any case, each specific accounting scheme may require its own register structure, and our example is just a demonstration of one of the possible options.

Having discussed the theoretical part of the issue, let's move on to practice. Let's create a new one accumulation register, let's call it Remaining Materials, parameter Register type let's leave it at that value Leftovers, rice. 6.12.


Rice. 6.12.

Let's turn it on accumulation register into the subsystem Operational Materials Accounting.

On the tab Data Let's create the following dimensions, resources and details:

Measurements:

Name: Nomenclature, Type: DirectoryLink.Nomenclature, Prohibition of blank values ​​– set.

Name: ResponsibleEmployee, Type: DirectoryLink.Employees, Prohibition of empty values ​​– set.

Resources

Name: Quantity, Type: number, length 10, precision 3

Name: Sum, Type: number, length 10, precision 2

Requisites:

Name: Recipient of Materials, Type: DirectoryLink.Employees

Pay attention to the names of these details, their types, as well as the standard register details (Fig. 6.13.) - this data will be useful to us when working on the procedure carrying out the document.

Let’s exclude the general attribute from the register details Organization. There is no need for it now. To organize the storage of data in the register across various organizations, we would need a new dimension - Organization, thanks to which we would be able to work with materials from various organizations.

Let's go to the tab Registrars window for editing an object and select documents as recorder documents - Receipt of Materials And Release of Materials to the Master.

At this stage the setup accumulation register finished, let's move on to document settings. Let's start with the document Receipt of Materials.

Open the object editing window for this document, go to the tab Movements(Fig. 6.14.) and press the button


Rice. 6.14.

In the constructor, select the type of register movement - Coming, in field Tabular part indicate the tabular part of the document Materials, click on the button Complete expressions. The automatic mechanism for establishing a correspondence between document and register data does not always work correctly (in the event that it cannot unambiguously determine the correspondence, or when the correspondence determined by it according to its logic differs from the desired one), so we will check the correctness of the established correspondences. As a result, the window Designer register movements should look like shown in Fig. 6.15.


Rice. 6.15.

After clicking the OK button, the following execution processing procedure will be generated in the document object module (this is how it looks after removing the comments that the code was built by the motion designer):

Procedure ProcessingProcessing(Failure, Mode) // register Remaining Materials Arrival of Movement. Remaining Materials. Write = True; For Each TekStrowMaterials From Materials Cycle Movement = Movements.RemainingMaterials.Add(); Movement.MovementType = AccumulationMovementType.Incoming; Movement.Period = Date; Movement.Nomenclature = TexStringMaterials.Nomenclature; Movement.ResponsibleEmployee = ResponsibleEmployee; Motion.Quantity = TechStringMaterials.Quantity; Movement.Amount = TexStringMaterials.Amount; EndCycle; End of Procedure

This procedure is declared in the object module, it is executed on

In any configuration of 1s 8.2 you can see this type of objects as registers. Their main purpose is to optimize data acquisition for reports. There are four types of registers: information registers, accumulation registers, accounting registers and calculation registers. And although these types are intended to solve different problems, just by the fact that they are all called “registers” one can guess that they also have something in common.

Firstly, as already mentioned, as configuration objects they are needed to more quickly read information from the database, for example in queries. The registers can be compared to a book library catalog (previously they were compiled on paper cards). That is, this is not only the storage of information (data), but also its systematization (creation of a certain structure), when data enters a specific register (for example, from documents of various types) and, if necessary, it can be quickly retrieved from there and displayed, for example, in report or otherwise process. In general, the main use of registers in 1C can be illustrated by the following scheme: “Document - Register - Report”, although there are exceptions.

Secondly, all registers, regardless of their type, have resources, dimensions and details. That is, it is determined What(resource) in what sections(measurements) need to be taken into account. Applicable to the library - we take into account books by author, genre and publisher. And with the help of details you can supplement the information, for example, with the year of publication. And here there is one important point - the structure of the register must be determined very carefully, depending on what information we are going to extract from it. For example, if in our library the search is most often carried out by the author’s last name, the card should first contain the author (the first dimension), and only after that should the genre (the second dimension).

Third, registers have a table structure, but it differs from the structure of object tables. So you won't find classes like RegisterReference or RegisterObject. The composition of the register table depends on its properties.

Fourthly, data is written to registers in the form of sets of records. Each set consists of one or more records. However, the record in the set cannot be referenced or accessed. And neither a set of records nor a record in a set can have a “mark for deletion” state.

Fifthly, when accessing registers in queries to obtain data, it is possible to access not only the physical register tables, but also virtual tables, which are a nested query that obtains data based on certain parameters. The virtual table parameters are set depending on the specific needs for obtaining data from register tables.

Now let's talk about the features of each type of registers:

1. Information registers

Perhaps the simplest type of register. Unlike other types of registers, its resource can be named not only as a numeric value, but also as another data type.

It has a special property that is not used in other types of registers - periodicity.

It may not have a registrar, that is, be independent; in this case, entries are made directly into the register, bypassing the registration document (this is the very exception to the general scheme of using registers in 1c). Whereas other types of registers must have at least one document-recorder.

In addition, this type of register has automatic control of the uniqueness of records by period (frequency specified in the register properties) and dimensions. That is, among the register entries there cannot be more than one entry with the same indicators period + measurement + recorder (if there is one). The uniqueness of records in other types of registers is determined by the registrar.

2. Accumulation registers

Designed to accumulate numerical indicators (resources) and is divided into two subtypes - Remains and Turnovers. The difference between them is that the Accumulation Register Balances is intended to obtain information about the state “at a point in time,” and Turnovers is intended to obtain information about data “for a period.”

The accumulation register data is stored in the database in the form of two tables - a movement table and a totals table. Direct access is only possible to the motion table.

3. Accounting registers

It is similar to an accumulation register, but is designed to systematize data on accounting entries. However, it can be used not only for accounting, but also for any other type of accounting.

Its main feature is the ability to record data using the double entry method using the Debit-Credit principle. To implement the possibility of generating transactions, the Accounting Register must be associated with a special object - Chart of Accounts.

4. Calculation registers

This type of register is intended not only for storing, accumulating and systematizing data, but also for implementing complex mechanisms for periodic calculations. To do this, in the properties of the calculation register, you need to define another 1C object - a plan of calculation types. That is, the operation of a register of this type is impossible without defining a specific plan for calculation types for it.

We can say that the calculation register is used to store information about the types of calculations, and to store the results of calculations, and for intermediate values ​​of calculations. Its main purpose in 1C configurations is to calculate accruals, for example, wages and other payments to employees. And to implement these tasks, when determining the parameters of the calculation register, it is possible to indicate in it a connection with a time schedule, which allows calculations to be made depending on the time specified in this schedule. The time schedule itself must be defined using the appropriate information register.

Thus, we can say that the calculation register ultimately has the most complex structure compared to other types of registers in 1s.

Let's continue to consider the work of our document “Service Provision”. Until now, we have created movement accumulation registers only for document lines that contain materials. We did not take into account the services contained in the document.

The fact is that when accounting for services, completely different criteria are important than when accounting for materials. First of all, it makes no sense to talk about how many services there were and how many are left; only the amount and number of services that were provided over a certain period of time are important. In addition, the following points are interesting:

what services were provided (to create a service rating)

which particular client the services were provided to (to provide him with a discount on the volume of previously paid services,

which master provided services (to calculate his wages)

It is obvious that existing accumulation registers are completely unsuitable for solving such problems. Therefore, we will create another “storage” of data that will be used in our program - the circulating accumulation register “Sales”.

10.2. What is a negotiable accumulation register?

Accumulation registers can be balance registers and turnover registers.

The “Material Remaining” and “Material Cost” registers that exist in our training configuration are balance registers. If you remember the moment when we created the “Materials” report, then in the report designer we saw that the system creates three virtual tables for such registers: a table of balances, turnover and a cumulative table of balances and turnover.

The circulating accumulation register is very similar to the balance register, already familiar to us, for which the concept of “remainder” does not make sense. The turnover register accumulates only revolutions; the balances are without

are different. Therefore, the only virtual table that the system will create for such a register will be the turnover table.

Otherwise, the turnover register is no different from the balance register.

It should be said about one feature of the design of accumulation registers, which is directly related to the possibility of obtaining balances.

When creating a circulating accumulation register, there is no particular difficulty in determining which parameters should be the dimensions of the register - we can assign any parameters we need as its dimensions.

The situation is completely different in the case of an accumulation register that supports the accumulation of balances. For him, the choice of measurements should be made based on the fact that register movements can be carried out “in two directions”: inflow and outflow. Thus, as measurements it is necessary to choose those parameters according to which movements will accurately be carried out in both one and the other direction.

For example, if materials are accounted for in terms of item and warehouse, it is obvious that both item and warehouse can be measurements, since both the receipt and consumption of materials will always be carried out indicating a specific item and a specific warehouse. If in this situation there is a desire to reflect the accounting of materials also in the context of the supplier, then here it is necessary to proceed from the specific accounting scheme adopted at the enterprise.

Most likely, when materials are received, the supplier will be indicated, but when materials are consumed, with a high degree of probability, the supplier will not be indicated, since in most cases this is completely unnecessary information. This means that the supplier should be added as an accumulation register attribute.

If, when consuming materials, the supplier will be indicated for sure, then it makes sense to add the supplier to the register dimensions.

In other words, for each of the dimensions of the balance accumulation register, a change in resources must necessarily be carried out in both directions: income and expense.

For register details, this principle is unimportant; according to register details, resources can only be received or only spent.

Violation of this principle of constructing accumulation registers will lead to unproductive use of system resources and, as a result, slowdown and loss of performance.

10.3. Creation of a working accumulation register

Now that we know “almost everything” about accumulation registers, let’s open the configurator and create a new configuration object, accumulation register. Let's call it “Sales” and define the type of register - “Turnover”.

262. Let's create a new configuration object Accumulation register: select the object on the tree Accumulation register, MP, select Add , in the Name field enter Sales , in the Advanced List View enter Movements in the Sales register, click Next.

263. On the Subsystems tab, select Accounting, Materials Accounting, Services.

264. On the Data tab, create register dimensions:

265. Create register three resource:

Quantity, type Number, length 22, precision 2, Revenue, type Number, length 22, precision 2, Cost, type Number, length 22, precision 2.

266. Make available in the section action panel the command to view accumulation register entries: select a branch in the configuration object tree Subsystems, MP, All subsystems, in the All subsystems window on the left in the Subsystems list, select the Accounting subsystem, in the Navigation Panel group. Normal for the Sales team, turn on visibility and drag it to the group Navigation panel. See also.

267. Do the same for subsystems Provision of services and

Materials Accounting

268. Open the window for editing the configuration object Document Provision of Services and on the Movements tab we indicate that this document will create movements in the Sales register.

269. Select a tab Other, Object Module.

270. Enter the code that creates the Sales register movements produced by the Provision of Services document, highlighted in bold:

Procedure ProcessingConduct(Failure, Mode) //((__MOTION_REGISTER_CONSTRUCTOR

// This fragment was built by the constructor.

// When reusing the constructor, changes made manually will be lost!!!

Movements.RemainingMaterials.Write = True; Movement.CostMaterials.Write = True;

Movements.Sales.Record = True;

For each Tech LineList of Nomenclatures From the List of Nomenclatures Cycle

TechStringList of Nomenclature.Nomenclature.Type of Nomenclature

= Enumeration. Types of Nomenclature. Material Then

// Register Material Remaining Consumption

Movement = Movements.RemainingMaterials.Add();

Movement.Period = Date;

Movement.Warehouse = Warehouse;

Movement = Movements.MaterialsCost.Add();

Movement.MovementType = AccumulationMotionType.Expense;

Movement.Period = Date;

Movement.Material = TekStringList of Nomenclature.Nomenclature;

Movement.Cost = TechStringListItems.Quantity*TechStringListItems.Cost;

endIf;

Movement = Movements.Sales.Add(); Movement.Period = Date;

Movement.Nomenclature = TechStringList of Nomenclature.Nomenclature;

Movement.Client = Client; Move.Master = Master;

Movement.Quantity = TechStringList of Nomenclature.Quantity;

Movement.Revenue = TechLineList of Items.Amount;

Movement.Cost = TechStringListItems.Cost*TechStringListItems.Quantity;

EndCycle; //))__CONSTRUCTOR_MOVEMENT_REGISTERS

End of Procedure

271. Let's launch 1C:Enterprise in debug mode, open the document Provision of Services dated July 27, click Conduct, go to the list of movements in the Sales register.

272. Open the document Provision of Services dated July 29, click Proceed, go to the list of movements in the Sales register.

273. Open the document Provision of Services dated July 29, click Proceed, go to the list of movements in the Sales register.

11th day. Reports 11.1. Methods to access data

The 1C:enterprise system supports two ways to access data stored in the database:

object (read and write)

tabular (for reading).

The object way of accessing data is implemented through the use of built-in language objects. At the same time, when accessing any object of the built-in language, we access a certain set of data located in the database as a single object.

For example, the DocumentObject.Service Provision object will contain the values ​​of all the details of the Service Provision document and all its tabular parts.

Tabular access to data is implemented using database queries, which are compiled in a query language. Here the developer gets the opportunity to operate with individual fields of the database tables in which certain data is stored.

11.2. Working with requests

To generate and execute queries to database tables, the system uses a special Request object. The query is convenient to use when you need to obtain a complex data sample, grouped and sorted in the desired way. One of the classic examples of its application is a summary of the state of the accounting register at a certain point in time. In addition, the query mechanism makes it easy to obtain information in different time frames.

11.3. Query Data Sources

The query receives initial information from a set of tables.

All tables that the query language operates on can be divided into two groups:

real tables

virtual tables.

Real tables contain data from any one real table stored in a database.

For example, the real table is Directory.Clients corresponding to the Clients directory.

Virtual tables are formed mainly from data from several database tables. For example, the virtual table is Accumulation Register.Material Remainings.RemainingsAndTurnover, formed from several tables of the accumulation register Material Remaining.

What they have in common is that they can be given a number of parameters that determine what data will be included in these virtual tables.

Virtual tables are not stored in the database.

Real tables are divided into object (reference) and non-object.

Object tables provide information about reference data types (directories, documents, etc.). And in non-object ones - all other data types (constants, registers, etc.).

A special feature of object tables is that they include a Link field containing a link to the current record.

11.4. Query language

The algorithm by which data will be selected from the input query tables is described in a special language - the query language.

The request text may consist of parts:

1. request description

2. query merging

3. ordering results

4. auto-ordering

5. description of the results.

The only required part is the description of the request.

Query description – defines data sources, selection fields, groupings, etc.

Query merging – determines how the results of executing several queries will be combined.

Result ordering—defines the ordering conditions for query result rows.

Auto-ordering allows you to enable automatic ordering of query result rows.

Description of totals – determines which totals need to be calculated in the query and how to group the result.

Data composition system

The data composition system is designed to create custom reports.

The source data for the report layout contains the data layout diagram. These are data sets and methods for working with them.

The developer creates a data composition scheme in which he describes the request text, data sets, connections between them, available fields, data retrieval parameters, and sets the initial layout settings - report structure, data layout, etc.

The developer creates a data layout scheme and default settings.

Based on the layout and settings, the layout builder creates a layout.

The data composition processor selects data from information security according to the layout layout, aggregates and formats this data.

The layout result is processed by the output processor, and as a result, the user receives the resulting spreadsheet document.

11.5. Selecting data from one table

274. Let's create a report: select the Reports, MP branch in the configuration object tree, select Add, enter in the Name field

Register of Documents Provision of Services , press tab and in the field The synonym should appear Register of Documents Provision of Services , in the advanced view field, enter List of services provided,

275. click Open with data composition diagram

276. Add a new data set - query: click the Add button, select.

277. Create a request text: click the button Request constructor

sa.

278. Provision of Services, from this table we select the fields Warehouse,

279. Select a tabAssociations/Aliases, indicate that the Link field will have the Document alias.

280. Select a tab Order, specify that the query result should be ordered by the value of the Document field.

281. Click OK.

Provision of Services. Warehouse,

Providing Services. Master,

SORT BY

Document

Provision of Services. Warehouse,

Providing Services. Master,

Document.Provision of Services HOW to ProvideServices

SORT BY

Document

Description of the request Result ordering (ascending by default) List of selection fields

After AS data source alias Data sources

282. select settings tab, select Report, MP, New

grouping.

283. On the Selected fields tab, move the fields with the mouse.

284.

285. In the window for editing the configuration object Report Document RegistryProvision of Services, select the Subsystems tab, select Provision of Services.

286. Let's launch 1C:Enterprise in debug mode, in the action panel of the Provision of services section, select Register of documents for the provision of services, click Generate.

We see that the report contains a register of documents Provision of services. Moreover, by double-clicking on the Document field, we can open the source document and also perform other actions.

11.6. Selecting data from two tables

286. Let's create a report: select a branch in the configuration object tree Reports, MP, select Add, enter Service Rating in the Name field, press tab and it should appear in the Synonym field

287. click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

288. Add a new data set - query: click the Add button, select Add Dataset - Query.

289. Create a request text: click the button Request constructor

sa.

290. As a data source for the request, select the object table Nomenclature and the virtual table of the accumulation register SalesTurnover.

290. Let's rename the Nomenclature table to sprNomenclature

291. Let's move the fields SprNomenclature.Link and SalesTurnover.RevenueTurnover to the list of fields.

292. select the communications tab. Since the query involves several tables, it is necessary to determine the relationship between them.

By default, the platform has already created a connection for the Nomenclature field. That is, the values ​​of the Nomenclature dimension of the Sales register must be equal to the reference to the Nomenclature directory element.

293. Uncheck the All checkbox for the SalesTurnover table and set the SprNomenclature table.

This will be a left join type of connection, that is, the query result will include all records of the Nomenclature reference book and those Sales register records that satisfy the connection condition for the Nomenclature field.

As a result of the request, all services will be present, and for some of them the revenue turnover will be indicated.

294. Select the Conditions tab and set the selection so that the groups in the Nomenclature directory do not appear in the report.

295. Select the standard nomenclature, select the ThisGroup field, check the Custom checkbox, and enter the code in the Condition field:

sprNomenclature.ThisGroup = FALSE

296. Another condition is that the selected item is a service. This is a Simple condition. Drag the Item Type field to the list of conditions. The platform will automatically generate a condition according to which the item type must be equal to the value of the Item Type parameter. Next, before executing the request, we will pass the enumeration value – Service – to the Nomenclature Type parameter.

297. Select the Merge/Aliases tab, the Link field will have an alias Service, and the register field is Revenue.

298. Select a tab Order, select Revenue, specify that the query result should be sorted in descending order of the revenue field value.

299. Click OK.

SalesTurnover.RevenueTurnover AS Revenue FROM

Directory.Nomenclature AS referenceNomenclature

LEFT CONNECTION RegisterAccumulations.Sales.Turnover AS SalesTurnover

Software SalesTurnover.Nomenclature = referenceNomenclature.Link

WHERE sprNomenclature.ThisGroup = FALSE

And sprNomenclature.Type of Nomenclature = &Type of Nomenclature-

ORDER BY Revenue DECREASE

In the data composition system, resources refer to fields whose values ​​are calculated based on the detailed records included in the grouping. Resources are group or overall report totals.

300. Select the Resources tab, select Revenue, select >> to have the designer select all available resources for which the total can be calculated. For us, this is the Revenue resource.

Options

The user is interested in data on economic activity for a certain period. Therefore, any report has parameters that specify the beginning and end of the reporting period.

Report parameters set the conditions for selecting records for the report.

301. Select a tab Options

302. We will relieve the user of the need to specify the time when entering the date of the period for which the report is generated: select the Date, M2 field in the Start of Period line, select Date in the Date Composition list, click OK.

303. For the End of Period parameter, select the Availability restriction checkbox.

304. click the Add button, enter End Date in the Name field, select Date in the Type list, specify Date Composition – Date.

305. Select the End of Period parameter, enter the expression in the Expression field

EndPeriod(&EndDate, "Day")

306. Select line Type of Nomenclature, In the list of the Value column, select Service.

Settings

307. select the settings tab, select Report, MP, New grouping.

A grouping of detailed records will appear in the report structure.

308. On the Selected fields tab, move the mouse to the fields Service, Revenue.

309. Select the Other Settings tab, enter the report title – Service Rating.

Quick custom settings

310. Select a tab

311.

312. For the Start Date field, in the Values ​​list, select Start of this month.

313. For the End Date field, in the Values ​​list, select Start of this day.

314. Let's close the data composition schema designer.

315. In the window for editing the configuration object Report Service Rating, select the Subsystems tab, select Provision of services.

316. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Service rating.

Symbol

317. In the configurator, open the data composition scheme on the Settings tab, select the tab at the bottom of the window Symbol, Click the Add button.

318. In the Design field, select burgundy text color, click-

319. Then we indicate the Condition upon the occurrence of which the design will be applied, select New element, click the Add button, in the Left value column indicate Revenue, in the Comparison type column indicate Less, in the Right value column indicate 700,

click OK.

That is, when the Revenue field has a value less than 700, something will be highlighted in red.

320. Now let’s set the list of fields to be created: in the Form fields field, click three dots, click Add, select Service, select Revenue, click OK.

321. In the Symbol Representation field, enter Unpopular service. This is what the user will see in their settings.

322. Now let’s add the created condition to the user settings: click the button Custom Element Properties

settings , check the box Include in user settings and set the property Edit mode to value

Ordinary.

We've included the conditional appearance setting we created in the normal user settings. These settings, unlike quick settings, are not located in the report form, but are called up by clicking the Settings button.

323. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Service rating, click Generate.

We see that the amount of services is less than 700 rubles. highlighted in red.

323. Click the Settings button, uncheck the Unpopular service setting, click Finish editing.

324. Click create, you see the color highlighting has disappeared.

Custom Settings

325. In the configurator on the tab Data composition schema settings contain complete report settings that are specified by the developer. Some of them can be presented to the user to create a random selection, conditional report design, etc.

326. Click the Custom Settings Item Properties button located at the top of the command panel of the settings window.

327. Set the usage flag for settings Selection and Conditional design and set their edit mode to

value Normal, click OK.

328. Select the Selection tab, expand the Service field, select the Parent, M2 field, and drag it to the selection list on the right side of the window.

We have created the ability to select by groups of services that the user can set in 1C:Enterprise mode.

329. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Service Rating, click Settings, the Selection and Symbol settings appear there.

We created the Unpopular service setting in advance in the configurator. And now, having added the conditional notation setting in general,

We provided the user with the ability to create any number of their own conditions.

330. Let's set the selection in the report so that it includes the following services related to the installation of washing machines: click three dots in the user settings window in the Selection line: in the Selection line, click three dots, in the Value line, click three dots, expand the Services group and select Washing machines from the Nomenclature directory, click OK, click Finish editing, click Generate.

The report only includes installation services for washing machines.

331. Click Settings, in the Selection line, click the Cleaning button.

11.7. Report 3. Displaying data for all days in the selected period

The Craftsmen's Revenue report will contain information about how much revenue the LLC received thanks to the work of the craftsmen, with details by day in the selected period and a breakdown of the clients served on each day.

331. Let's create a report: select the Reports, MP branch in the configuration object tree, select Add, enter in the Name field RevenueMasters, press tab and in the Synonym field the revenue of the mothers should appear, in the expanded view field enter the List of services provided,

332 click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

333. Add a new data set - query: click the Add button, select Add Dataset - Query.

334. Create a request text: click the button Request constructor

sa.

335. As a data source for the request, select the virtual table of the accumulation registerSales.Turnover.

336. In the Tables field, select Sales.Turnover, click the Virtual table parameters button, select Day in the Frequency list, click OK.

337. Select fields from table SalesTurnover.Master, Pro

salesTurnover.Period, SalesTurnoverClient, SalesTurnover.RevenueTurnover.

338. Select a tabAssociations/Aliases, indicate that field SalesTurnover.RevenueTurnover will have the alias Revenue, click OK.

SalesTurnover.Master,

SalesTurnover.Period,

SalesTurnover.Customer, SalesTurnover.RevenueTurnover AS Revenue

RegisterAccumulations.Sales.Turnover(, Day,) AS SalesTurnover

339. Select the Resources tab, select Revenue.

Options

340. Select the Parameters tab, for the Start of Period parameter enter Heading Start Date, in the Type field select the composition of the date Date.

342. Add the EndDate parameter, Date type, date composition –

343. For EndPeriod, specify the expressionEndPeriod(&EndDate, “Day”)

and the Restrict availability check box. Settings

344. Select the Settings tab, select the root element Report, click Add, add a top-level grouping by the Master field, add a grouping nested in the previous one by the Period field, add another grouping nested in the Detailed records grouping by the Period field without specifying a grouping field.

345. Select the Selected Fields tab, add the fields Customer, Revenue.

346. Select the Other Settings tab, in the Grouping Fields Location list, select Separately and only in totals, in the Vertical Location of General Tiogs list, select Start, and in the Heading field, enter Mater Revenue.

347. Select a tab Options, select Start Date, click Custom Settings Item Properties, enable the Include in Custom Settings check box, click OK.

348. Select the Options tab, select End Date, click Custom Settings Item Properties, select the Include in Custom Settings check box, and click OK.

349. In the window for editing the configuration object Report Masters' Revenue, select the Subsystems tab, select Provision of services and Payroll.

350. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select Craftsmen's Revenue, set the period from July 1 to July 30, click Generate.

Displays all dates in the selected period

We only show those days for which there is non-zero data in the Sales accumulation register table. We need to show data with detail for all days in the selected period.

351. In the data composition scheme, select Settings, select the Period grouping, click the Period tab in the command bar of the window.

352. Select the Grouping Fields tab, select the Period field,

V In the Add-on Type list, select a day.

353. In the new row in the Period Start Date column, M2, click the Clear button, click the T data type selection button, select Data Composition Field, click OK, select the three dots, select the Period Start option.

354. In the new row in the Period End Date column, M2, click the Clear button, click the T data type selection button, select Data Composition Field, click OK, select the three dots, select the End Date option.

355. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select Craftsmen's Revenue, set the period from July 1 to July 30, click Generate.

New version of the report. Diagram

Logically, a diagram is a collection of points, series, and series values ​​at a point.

Moments or objects for which we obtain characteristic values ​​are used as points, and characteristics whose values ​​interest us are used as series. At the intersection of the series and the point is the value of the chart.

For example, a diagram of sales of product types by month consists of points - months, series - product types and values ​​- sales turnover.

A diagram as an object of the built-in language has three areas: the construction area, the title area, the legend area

356. Open the data composition scheme on the Settings tab, select Add in the list of report options, enter the name Revenue Volume.

357. Let's add a chart to the report structure: select the root element Report, MP, New Chart.

358. Select the branch Points, MP, New grouping, select the Master field.

359. Select Selected Fields, click Report, select

360. Select the Other Settings tab, select Chart Type – Measurement.

361. Select the stripes of the measurement diagram according to Fig.

362. Select a tab Options, select Start Date, click Custom Settings Item Properties, enable the Include in Custom Settings check box, click OK.

363. Select the Options tab, select End Date, click Custom Settings Item Properties, select the Include in Custom Settings check box, and click OK.

364. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Provision of services section, select Masters' Revenue, click select option, select Revenue Amount, click

11.8. Report 4. Obtaining current values ​​from the periodic information register

The report will contain information about what services the LLC provides and at what price.

365. Let's create a report: select the branch Reports, MP in the tree of configuration objects, select Add, in the Name field enter List of Services, press tab and in the Synonym field List of services should appear, in the advanced view field enter List of services provided,

366 click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

367. Add a new data set - query: click the Add button, select Add Dataset - Query.

368. Create a request text: click the button Request constructor

sa.

369. Select the object table as the data source for the query Nomenclature and virtual table of the register of information Prices. Latest Cut.

370. Rename the Nomenclature table to sprNomenclature.

371. In the Tables field, select Prices.CuttingLatest, click the Virtual table parameters button, in the Period field enter &ReportDate.

372. Select fields from table sprNomenclature.Parent,

373. Select the Links tab, uncheck the All checkbox for the register table, and enable the All checkbox for the lookup table.

374. Select the condition tab, select the Item type field,

375. Select the Association/Aliases tab, replace the Parent field with Service Group, Link to Service field, click OK.

SELECT sprNomenclature.Parent AS Service Group,

FROM Directory.Nomenclature AS referenceNomenclature

LEFT JOIN RegisterInformation.Prices.SliceLast(&ReportDate,) AS PricesSliceLast

Software (PricesSliceLast.Nomenclature = referenceNomenclature.Link)

WHERE referenceNomenclature.Type of Nomenclature = &Type of Nomenclature

376. Select the Resources tab, select Price.

377. Select the Parameters tab, for the Item Type parameter in the Value column, select Service.

378. For the Report Date parameter, remove the availability restriction (Og), in the Type field, select the date composition – Date.

379. For the Period parameter, set the availability limit.

380. Select the Settings tab, select the root element Report, MP, New grouping by the Service Group field, Hierarchy grouping type.

379. Select the grouping GroupServices, MP, New grouping without specifying the group field (Detailed records).

380. Select Selected fields, specify the fields Service, Price.

381. Select Other Settings, Vertical Grand Totals select None.

382. Select the Services Group tab, in the Location of grouping fields list, select Separately and only in totals, and in the Heading field, enter List of services.

383. Select a tab Options , select Report date, click Custom Settings Item Properties, turn on the Include in custom settings check box, click OK.

384. In the window for editing the configuration object Report List of services, select the Subsystems tab, select Provision of services and Accounting.

385. Open the periodic Prices register, add a new value for the Diagnostics service for July 27 - 350 rubles.

386. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select List of services, enter the date July 26, click Generate, the diagnostic price should be 600.

387. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select List of services, enter the date July 27, click Generate, the diagnostic price should be 350.

11.9. Report 5: Using a calculated field in a report

388. Let's create a report: select the branch Reports, MP in the tree of configuration objects, select Add, enter Client Rating in the Name field, press tab and it should appear in the Synonym field Customer rating, in the advanced view field, enter List of services provided,

389. Click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

390. Add a new data set - query: click the Add button, select Add Dataset - Query.

391. Create a request text: click the button Request constructor

sa.

392. As a data source for the request, select the virtual table of the savings register Sales.Turnover.

393. Select fields from table

SalesTurnover.Client

SalesTurnover.RevenueTurnover

393. Select the Association/Aliases tab, replace the RevenueTurnover field with Revenue, CostTurnover with Cost.

394. Click OK.

395. Select the Calculated Fields tab, click the Add button, enter Revenue in the Data Path field, and enter Revenue in the Expression field.

Revenue - Cost

396. Select the Resources tab, select Revenue, Income, Cost

397. Select the Settings tab, select the root element Report, MP, New Chart.

398. Select Points, MP, New grouping by Client field.

399. Select Selected Fields, select Revenue.

400. Select Other settings, chart type – 3-D pie, enter Customer Rating in the title field.

401. In the window for editing the configuration object Report List of services, select the Subsystems tab, select Provision of services and Accounting.

402. Let's launch 1C:Enterprise in debug mode, in the action panel of the Services section, select Customer rating, click Generate.

11.10. Report 6. Outputting data to a table

Let's create a universal report to allow the user to change its structure and appearance.

403. Let's create a report: select the Reports, MP branch in the tree of configuration objects, select Add, enter Universal in the Name field, press tab and Universal should appear in the Synonym field, enter List of services provided in the expanded view field,

404. Click Open with data composition diagram . In the layout designer window, select a layout type Data composition diagram, click Finish.

405. Add a new data set - query: click the Add button, select Add Dataset - Query.

406. Create a request text: click the button Request constructor

sa.

407. As a data source for the request, select the virtual table of the accumulation register Sales.Turnover.

408. Select fields from table

SalesTurnover.Nomenclature

SalesTurnover.Client

SalesTurnover.Master

SalesTurnover.QuantityTurnover

SalesTurnover.RevenueTurnover

SalesTurnover.CostTurnover

409. Click OK.

410. Select the Resources tab, select >>.

411. Select the Settings tab, select the root element Report, MP, New Table.

412. Select the Table element in the structure and click the Custom Settings Element Properties button. Select Selected Fields, Row Grouping, Column Grouping.

413. In the window for editing the configuration object Report List of services, select the Subsystems tab, select Provision of services.

414. Let's launch 1C:Enterprise in debugging mode, in the action panel of the Services section, select Universal, click Generate. Empty!

415. In the Selected fields line, click the three dots and select RevenueTurnover.

416. In the Lines line, click the three dots, add a grouping by the Nomenclature field with the Hierarchy type.

417. In the Columns row, add a grouping by the Master field.

418. Click Generate.

419. In the Selected fields line, click the three dots and select CostTurnover.

420. In the Lines line, click the three dots, delete the grouping by the Items field, enter the grouping by the Customer field.

421. Click Generate.

422. In the Selected fields line, click the three dots and delete CostTurnover.

423. In the Lines line, click the three dots, delete the old grouping, enter a grouping by the Nomenclature field with the Hierarchy Only type.

424. In the Columns line, add a grouping by the Customer field, and place it first..

425. Click Generate.

For the principles of dividing accumulation registers into current and residual, see the article.

Question 12.21 of exam 1C: Platform Professional. What is the maximum number of measurements that can be defined for an accumulation register with the Remaining type?

  1. The number of measurements is not limited by the platform
  2. Number of measurements when using units up to 30
  3. All options are correct

In accordance with the answers, the number of dimensions for residual registers is not limited, but for circulating registers it is limited to 30. In fact, no proofs were found, and more could be added for the reverse registers:

Question 12.22 of exam 1C: Platform Professional. What is the maximum number of measurements that can be determined for an accumulation register using the Turnover types?

  1. The number of measurements is not limited by the platform
  2. Number of dimensions when using a summary table up to 30
  3. Number of measurements when using units up to 30
  4. All options are correct

See previous question. Aggregates do not actually affect the dimension limitation:

Question 12.27 of exam 1C: Platform Professional. When determining the type of accumulation register, the following should be taken into account:

  1. Dependence of indicators stored in resources on previous states
  2. Dependence of indicators stored in resources on the period of determination
  3. Availability of possible records with the type of movement "Incoming" and "Output"
  4. Type of value of indicators stored in resources
  5. All of the above answers are correct
  6. The correct answers are 1,2,3

The correct answer is six. The value type has nothing to do with it - it is numeric by default.

Question 12.28 of exam 1C: Platform Professional.To obtain information about the balances of accumulated funds, you can use:

  1. Accumulation registers with the "Remains" view
  2. Answers 1 and 2 are correct

Definitely the first answer.

Question 12.29 of exam 1C: Platform Professional. To obtain information about the turnover of accumulated funds, you can use:

  1. Accumulation registers with the "Remains" view
  2. Accumulation registers with the "Turnover" view
  3. Answers 1 and 2 are correct

The correct answer is the third - the residual register contains data on both turnover and accumulated balances.

Question 12.31 of exam 1C: Platform Professional. Choose the correct statement:

  1. An accumulation register with the "Turnover" view allows you to obtain information about turnover for a period more effectively than a register with the "Remains" view.
  2. An accumulation register with the “Turnover” type allows you to obtain information about turnover for a period with the same efficiency as a register with the “Remains” type, but when posting a document, recording in the register will occur faster, because balances will not be calculated
  3. An accumulation register with the "Turnover" view increases the overall efficiency of the database, because information about balances is not stored or recalculated, and, consequently, the size of the database is reduced

The correct answer is the first one. The size of the processed table is smaller.

Question 12.50 of exam 1C: Platform Professional. How does the system determine the turnover for an accumulation register with the balance type?

  1. The system takes current data for the balance accumulation register from the totals table, which stores already calculated turnovers
  2. To obtain circulating data, you must enable the use of aggregates
  3. Current data for such registers is not stored in the system, but is calculated at the time the system is contacted for such data

The correct answer is the third, turnover is calculated as the difference between the totals.

Question 12.51 of exam 1C: Platform Professional. Why does there exist a turnover accumulation register, if in the balance accumulation register there is the possibility of obtaining turnover?

  1. For use in cases where information on balances is not required
  2. To expand the capabilities of current data analysis
  3. Options 1 and 2 are correct
  4. All options are correct

The correct answer is fifth. Firstly, there are indicators for which balances are basically meaningless, for example, cash flows broken down by items; this determines the first option. Secondly, it is assumed that the residual registers are constructed with minimal analyticity, and therefore effort is required to extract data from them. This leads to the second and third options.

Question 12.52 of exam 1C: Platform Professional. For what tasks can the mechanism for obtaining circulating data in the accumulation register with the type balances be used?

  1. To simplify the structure of the application solution
  2. To speed up the development process
  3. To optimize the configuration
  4. To obtain simple revolutions together with remainders
  5. All options are correct

The correct answer is obviously the fourth.