Accumulation register in 1s 8.3 different documents. Documents, accumulation registers, storage systems. Example of how to select movements in the accumulation register

13.04.2024 Information

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 can 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 turnover 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, turnover, balances and turnover. 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, 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 canceling execution). The comparison of document and register data is made by comparing data types.

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.

1C information registers it is a structured set of data with dimensions and resources. Designed to store periodic information.

Periodicity

Information is stored by dimension and period. You can set the frequency of the information register:

  • Non-periodic
  • by registrar
  • second
  • a week
  • month
  • quarter

Frequency is needed to select information from the register for a certain period of time. If you specify a frequency, entries in the register will be made with the period when the entry was made. Let’s say if you look at the “Item Prices” register, you can see the history of price changes, with what measurements and in what period of time the entry was made.

Periodicity in information registers is needed for information that changes over time, for example: exchange rates, product prices, product discounts and markups, etc.

Registrars

If you make an entry into the information register using a document, you need to set the entry mode: “Submission to the registrar” and select the document with which the entry will be made in the register. Then the “Registrar” field will appear in the register, where information will be stored on what document the entry was made with. The recorder can also be used as a period; to do this, indicate in the “Frequency” field - “By recorder”. Subordination to the registrar is done when it is necessary to strictly link a register to a document and changing entries in the register manually becomes unavailable.

There may be several documents that will act as registrars. In order to add a registrar, you need to go to the properties of the desired information register, go to the “Registrars” tab and check the boxes next to the documents that will act as a registrar.

You can see the movements the recorder makes from the document. To do this, you need to go to the document you are interested in, click: Go – Document movements by the registrar.

Don’t forget to add rights in the registry properties; they can be assigned on the “Rights” tab. Then in the list of roles you need to select the role to which you want to add rights to the register and in the list of rights set the rights to for the selected role.

Uniqueness of records

The uniqueness of a record depends on the period and measurements. For example, if you want to write a record with the same measurements in the “Item Prices” register on the same day, then you will not be able to do this and the program will cause an error, since the periodicity of the register is within a day.

If the frequency is set by the registrar, it also participates in the uniqueness of the record.

For non-periodic and independent registers, uniqueness depends on the combination of dimensions.

Forms

To view records, use the list form, in it you can set the selection according to the fields you are interested in, view the history of records and change them through the record form. You can view register entries as follows: in the top menu, click the “Operations” - “Information Registers” button. In the window that opens, select the register you need. After this, a list form will open in the form of a table, where each entry is a unique entry.

To edit/create, use the record form; if the record is subordinate to the registrar, then the field will not be available and the form cannot be created.

You need to add forms in the configurator by going to the information register, in the “Forms” tab and clicking on the “magnifying glass” next to the desired type of form. Next, a window will open where you can configure the fields of the future form (location, names and specify functionality).


Dimensions, resources and details

Dimensions are intended to form the uniqueness of a record; in the future, you can select them and make a cut based on a specific dimension. The combination of measurements forms the record key. It is better not to create a large number of dimensions so that the table does not grow and does not slow down while working with it.

Dimensions have a “Leading” checkbox; if it is checked, the record will be stored in the database as long as this dimension exists. Several leading measurements can be made. For example, in the information register “Item prices”, the leading dimension is the item; if you delete an item that is included in the record, then the entry in the information register for this item will be automatically deleted.

Resources are designed to store summary information: quantity, price, etc. In the future, we will receive resources for a certain period of time (if the register is periodic), according to measurements.

Details, in most cases, are intended to store additional information; they do not take part in the uniqueness of the record. For example, you can enter information such as author, comment, etc. into the details.

You can perform the following actions with the information register:

  • Deleting an entry in the 1C information register

Peculiarities

— Uniqueness of records based on a set of dimensions: each record in the information register is a new resource value.

— Entries in the information register can be either periodic or not.

— The information register can be dependent and independent of the registrar.

— It is possible to make a cross-section of the first and last records for the desired date. This is implemented by virtual tables: “Slice of the First” and “Slice of the Last”. To use these tables, you can use both selection and query (in the query designer you will select these virtual tables and you can make a query on them). These tables will be available if the information register is periodic.

The “Item Prices” register is a periodic register of information, entries are made according to the registrar.

The image shows that the frequency is set to within a day. This means that the price can be changed once a day based on measurements unique during the day.

The register is subordinated to the document “Setting item prices”. This means that the entry into the register comes from this document. Movements on a specific document can be viewed from the document form “Setting item prices”.

The register is designed to store information on the price of an item, with the dimensions “Price type”, “Item” and “Item characteristics”. The leading dimension is all three dimension fields; it will be possible to make selections based on it when sampling.

Conclusion: After reading the article, you will be able to create a 1C information register, add dimensions and resources, configure editing and list forms. Create a record and select existing records. If you have any questions, use the comments in the article, I will try to quickly answer your question.

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 debugging mode, open the Service Provision document 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 communication 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 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 End Date 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 information register 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 accumulation 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 - 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 savings 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.

All changes made to the database are stored in the corresponding tables. For 1C, these are tables of documents, document journals, directories and registers. The types of 1C registers, features and subtleties of their use will be discussed in our article.

Formation of entries in registers

One of the first questions about registers is: what for?

Why do you need to create separate tables, often duplicating existing records?

The answer here is quite simple. Of course, it is possible to isolate complex and time-consuming queries to the tables of source documents by listing the selection conditions, checking them for deletion marks and completion, but it is much simpler and less labor-intensive to create a specific slice of a set of records directly when saving the document and store it in a separate table, accessing to him as needed.

Thus, we found out that one of the ways to create a register entry is to write using a registrar (document). This option is present in all register types.

The process of generating register records based on a document is usually called document posting. An unposted document document has no movements in the registers; it is, in fact, a draft or blank.

The second option for generating a record is directly, without creating a registration document. You can create records in this way only in information registers; in the register properties, the “Record mode” attribute must have the appropriate value (Fig. 1).

Common to all registers

The internal structure of any register can be demonstrated in Fig.2

Fig.2

Let's look at it in more detail:

  • Dimensions – record properties that determine in which sections important information is stored;
  • Resources – they contain information that needs to be systematized;
  • Details – record fields that contain additional information;
  • Forms – a property that contains graphical information about the appearance of a list, element, etc. and their internal modules;
  • Layouts – printed forms of registers.

Information registers

Since we talked about information registers above, let’s talk about them.

This is probably the simplest and most understandable type of registers. A regular table containing columns and columns in which information is stored.

The list of important properties of the information register is small (Fig. 3), let's talk about the main ones:

Fig.3

  1. Periodicity, it indicates the extent to which the uniqueness of the record is controlled (within a minute, hour, day, year, in accordance with the selected value, two records with the same measurements cannot exist), it can also take the value “By recorder”, but for this you must select the appropriate recording mode;
  2. Recording mode is actually a choice of two values: “Independent” and “Submission to the recorder”.
    1. It is important to understand that choosing an independent mode does not mean that a record cannot be generated by a document; only selection by a registrar and control of the uniqueness of a record by it will be impossible;
  3. Allow totals for a slice of the first and Allow totals for a slice of the last: (let's combine two points into one) – when the appropriate checkboxes are checked, a request to the information register can be made using additional tables (Slice of the first and Slice of the last), which contain the corresponding data sets, as one of The parameters of these tables are the date on which it is necessary to make a selection of data.

Accumulation registers

We saw the structure of one of them in Fig. 2. The main property that greatly influences the appearance of the register, as well as its internal structure, is “Register Type” (Fig. 4)

Depending on the requirements for the stored information, it can take the following values:

  • Leftovers;
  • Revolutions.

In the first case, the database will contain information not only about the movements of resources in terms of dimensions, but also about the type of operation (receipt or expense). In addition, when creating a query, an additional table containing totals will be available.

One of the main problems that novice developers face when using the Balances and Balances and Turnover tables in queries is that when a query receives balances for a specific date, the data in these tables may differ. And there is one nuance here: when specifying a certain value as the end date of a period, the platform takes data from the Remaining table without including this value in the selection period.

If you require data that includes the end of the period, you can:

  • Use the table Balances and Turnovers;
  • Make a sample for a date 1 second greater than the specified one (i.e. not 12/31/16 23:59:59, but 01/01/17 00:00:00);
  • Use the Boundary method, which helps configure the option of including a point in time in the period under consideration (use case: Boundary(EndDate,Including).

Accounting registers

Quite specialized registers, in their design, resemble accumulation registers. The main difference from other types of registers of the 1C platform is the presence of the “Chart of Accounts” parameter in the property structure (Fig. 5).

Fig.5

The chart of accounts is a separate metadata object that requires a separate discussion. Depending on the chart of accounts, modern standard 1C configurations contain 4 main accounting registers:

  1. Budgeting;
  2. International;
  3. Tax;
  4. Self-supporting.

The second parameter characteristic of accounting registers is “Correspondence”.

Checking this box allows you to create double entries containing the credit account AccountKt and the debit account AccountDt and the analytics (subconto) corresponding to these accounts. If the checkbox is not checked, only one account will be entered in the register entries.

Calculation registers

These are probably the most difficult registers to understand. Meanwhile, in their essence they are very much reminiscent of accumulation registers of the “Turnover” type.

The defining difference between the calculation register and other registers is the presence in its properties of the “Calculation type plan” parameter. In addition, the calculation register, as well as the information register, is periodic.

In each calculation register, the ability to link a record with a time schedule specified in the corresponding information register can be enabled. This allows you to obtain working time data using a code.

In addition to the dimensions, resources and forms available in other types of register, calculation registers can be assigned a “Recalculation” object, where information about records that are irrelevant and require revision will be stored.

Their main use in standard 1C configurations is registration and facilitation of work with accruals for employees of the organization.