the Internet Windows Android

1C CCD External Data Set. SCD external data source, shipping from TK and then get residues for each document

When opening new branches of the company, to calculate the load on the server 1C: enterprises and other tasks, it will be necessary to see the dynamics of users' work in the information base in the form of a chart.

Dynamics need to be shown at the user selected period. As the displayed data will be the number of actions on these users in the context of the clock. Information for such a report can be obtained from registration log.

Consider the phased creation of a similar report and with the help of an external data set, we will construct it on the data layout system.

Read the registration log

And so, we will build a report at the CCD. We will not receive the data using a query from the database, and from the registration log. The method of storing the registration log of the platform wrote in the previous article.

In accordance with the specified period in the report, we need to get all user actions on the data information base. The resulting table is grouped on the user and output in the form of a chart (see Screenshot above).

For information from the registration log, we will use the global context method "unloaded ()". In the Event of the "Precomplicult" event of the created report, add the following program code:

Procedure for the precomponsult (document result, data storage, standardworking) standardwork \u003d false; // Disconnect the standard report output - we will display software // Get a plot report, incl. period Settings \u003d folder settings. Obtaining (); // Get the report settings Parameteriod \u003d folder settings. Reception (). Painted. Elements. Find ("Period"). Value; Zhortab \u003d new tables; The downloading \u003d new structure; // Create the registry selection structure // Fill the selection by the period Squeezing. Insert ("data", parameteriod. Dataternal); Squeezing. Insert ("Data", Parameteriod. Data Data); // Set the selection for events Arms \u003d new array; Massigatives. Add ("_ $ Data $ _ . Delete.. New"); Massigations. Add (" _ $ Data $ _ . POST."); Massigations. Add (" _ $ Data $ _ . TotalSperiodUpdate."); Massigations. Add (" _ $ Data $ _ . Unpost."); Massigations. Add (" _ $ Data $ _ . Update."); Withdrawal. Paste (" Event ", Massigatives); // Unload the registration log Unloaded (ZhRAG, arms); // Create and fill in the data for output to the report Jostab. Columns. Add ("time"); Jostab. Columns. Add (" Numbers"); For each page of the jostab cycle p. Time \u003d hour (p. Date); number of quantities \u003d 1; EndCycle; // Group results Jostab. Collapse (" Time name" , " Numbers" ) ; // ..............

The first parameter of the "Unloading agency" method sets the table of values \u200b\u200binto which the result of the sample will be unloaded from the registration log. The second parameter set the filter on the selected entries. Filtre is a structure, the keys in which are the fields for which the selection is established. We use the fields of "data" and "Data" to install the registration log analysis period, as well as the Event field, in which we transmit an array of strings (events names). An event-added event corresponds to the data on the data in the database.

You can read more about the use of the "Unloading Uploads" method in the assistant syntax.

We transfer the table of values \u200b\u200bin the SCD

In order for the CCD to work with the received table of values, you need to do the following:

1) Create a set of data in the layout scheme and set its fields.
2) In the software code of the "Precomplow" module "to register the transmission of the values \u200b\u200bof the values \u200b\u200bin the CD.

// Group results Jostab. Collapse (" Time name" , " Numbers"); Insitoring Valves \u003d New Proprietary AccessoriesCipded; // Create decryption data Complosing machine \u003d new fold-shirt-cleaner complex; // Create a layout layout // Initialize layout layout using data layout circuit // And previously created settings and decryption data SchemacksPrinky \u003d Receive: Basic ashamcomponovkin"); MocktackComponovka \u003d folder package. Perform (schematicpone, settings, data storage); // Scompon the result ProcessorComponovka \u003d new processor components; ProcessorComponovka. Initialize (mock-one, // !!! We pass the table "Zhortab" to the layout processor !!! New Structure (" Logregister", Журраб), policyshifts); document results. Clear (); // withdraw the result in tabular document Processor Equipment \u003d New processor-in-line results CommonTheldBlocks CPU. Installertocument (document results); CPU. Output (processor pump); Extrudresses

3) Customize the resources and report structure (see more details in the report file, the link to which is given at the end of the article).

This report settings completed and we can run it in the enterprise mode.

Outcome

The external data source in the CCC is subject to use in reports data from almost any sources, pursuing those data that we cannot get requests.

The use of SCD for such sources allows you to create reports with a flexible settings system, and also allows the user to change the output of the report, its structure. All the possibilities of the data layout system will be involved for such sources to the full.

Download a report from the example you can according to the following link.

Attention! Before you, the introductory version of the lesson, the materials of which may be incomplete.

Sign in as a student

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

1C 8.3 Data Layout System for Beginners: Report Representation in the form of a chart

Today we will add a report from the last lesson (or rather a copy of it) the ability to display the same data in the form of a diagram.

We put the goal

  • Make a copy of the report from the past lesson.
  • Display the same data in the form of a chart.
  • With this series (columns, the Y axis), there should be products, and points (x axis) - customers. The values \u200b\u200bof the columns (along the Y axis) and will be the amount of food that the client ordered data.

Change a copy of the past report

We make a copy of the report from the past lesson under the name "Lesson9" and open this copy in the "Deli" configurator.

We change the name of the report on the "Lesson9" and click the "Open Data Layout Scheme" button:

We will not change data sets - our task is to change their representation for the user.

Therefore, we immediately go to the Settings tab and pay our attention to the left column with the report options.

We did not work with this column before, but today I will tell you what its meaning.

All settings that we do on this tab (using the magic stick designer or manually at the bottom) they relate to one of the report options, which is highlighted in the left side of the window.

By default, this option is always the one and called the "main". The whole chip is that in the user mode you can easily switch between these options.

And here we now have a basic option, in the settings of which it is indicated - to display data in the form of a table:

Let's rename this option (double click) and the main in the "Table":

Add a new version of the report

Now with the help of the plus, add one more option (where we lock the setting of data output in the form of a chart):

Immediately let's call this option "Chart":

Customize a new report version

As you can see to the right of this option (we allocated it) Empty, that is, there is no settings. Create them with the help of our magic wand:

This time, choose the type of report "Chart ...":

As fields for display, select a "number" (by analogy with the table):

As a series (Y axis), we specify the "Food" field, and as points (X axis) - the "Clients" field:

It turned out like this:

Save our report in the configurator and launch it in user mode:

We see the table ... What is?! And the fact is that you just need to choose another version of the report. Click on the "Select option ..." button and select the "diagram" option:

Chart is ready

Once again we form a report:

Excellent, what beauty

Reference processing, after performing all the steps of this lesson

In conclusion module

On this we graduate consideration of the basis of the data layout system. I tried to tell and explain on simple examples Fundamental bases necessary for beginners to work with the CCD.

If you are in the future ( i advise you to do it after graduating from the whole school) There will be a need for a deeper study of the data layout system - there is a wonderful book E. Yu. Krustalava "Development of complex reports in 1C: Enterprise 8".

In this module you received sufficient knowledge and practical skills to start reading more serious literature on this topic.

We worked fine, it's time to rest!

On this tab, you can create an unlimited number of data sets. Data set is a source of data acquisition.

Distinguish several types of data sets:

  • Inquiry;
  • An object;
  • An association.

The query is the usual 1C request only the query language is slightly expanded. For convenience, you can use the request designer.

Object is an external data set, such as a table of values.

Combining - Combining multiple sets of data types Question and object.

In this article, we briefly run through all the constructor tabs of the data layout circuit. Data sets On this tab, you can create an unlimited number of data sets. Data set is a source of data acquisition. Distinguish several types of data sets: request; An object; An association. The query is the usual 1C request only the query language is slightly expanded. For convenience, you can use the request designer. Object is an external data set, such as a table of values. Combining - Combining multiple sets of data types Question and object. The links of data sets on this tab describe data sets. Here you can specify which data sets to bind and by what fields and with what parameters. The most important thing is that you need to remember: in the layout diagram, the left connection is always used when binding the sets! Calculated fields On this tab, you can create additional fields that are not described on the Data Sets tab. As an expressions for calculation, you can use the language of data layout expressions, fields from the main data sets, as well as the function not global common modules. Resources Resources are summary data on groupings. On the tab, you can assign a field resource from data sets, as well as from the calculated fields. Also, for resources, the expression on which they are calculated, and it is possible to specify the grouping on which the expression for resources will be calculated. Based on resource values, the overall results of the report are also calculated. The parameters of the data settings are usually used in the data set. All parameters described in the query appear on the Options tab. On this tab, you can specify the title, available types, available value and some other things. Read more about the parameters a little later. The default layout layout of the generated report is generated automatically by the data layout system. But the system also has the ability to develop separate areas of the report (fields, groups, resources ...). All layouts of individual areas created on this tab are only tied to the current report. Nested circuits Nested circuits are used in cases when the data of one report must be used in the other. In other words, we "embed" one data layout scheme to another, indicating communication on the total field. An example of using nested circuits can be viewed in this article. Settings on this tab developer creates standard settings Report formation. At the top of the window, a hierarchical structure is set. The status of the report formation may consist of the following elements: grouping; Table; Diagram; The nested diagram in the lower part of the window is set settings for the entire report and for each report structure item. Briefly in the settings tab: Selected fields - list of fields displayed in the report; Selection - all sorts of selection report recordings; Order - sorting records in the report; Data settings - the value of the report parameters; Custom fields - Additional reporting fields created by the user; Conditional design - set conditional design report records; Other settings - all sorts additional settings Such as: report title, layout of design, field location, and so on ....

Using 1c data layout systems impossible without data sets. In one layout diagram, there may be several data. And they can communicate with each other in a certain way. Or rather either or unite. In this article, consider combining data sets. Combining data sets in LCD is similar.

To combine two or more data sets in the SCD, you need to bookmark Data sets Pre-create a special data set - Association


Get this picture


And already in this created object, add sets that will be directly united. Let's add two sets of data. One of which will request, and the second for a variety - an object (external data source). Like this:


As an example, consider combining data sets with remnants of goods.

In that set, where we will use, manually add fields Product, number and we prescribe the name of the object containing the data


For a dataset where the query is used, we will receive data using balances here from such an accumulation register:


Making the simplest query

Choose respertovarovas. Tyovar. Conditions as a product, respens. Notebooks as balances (choose goods, residues) from the register. Towelos.t.ostatski as respens

To get rid of warehouses, I had to use the data layout in the query (all that in curly brackets) and turn off the autofill flag below. Also, as a product was taken not an element of the reference book, but its idea so that the type was the same as in the set with an external data source. That data from different sets fall into one field they should have the same name in the field Way. Therefore, for the field Residues the path was manually corrected on numberTo synchronize it with the second set of data. In fact, it is better to use the right alias immediately in the request. In this case, deliberately did not do it in order to focus on such a feature.

Now let's turn directly to the data
In the accumulation register, I have the following remnants of goods

and in the external data source here is such a picture

Perform the adjustment scheme setting the most primitive way.
Field number Naturally we will make a resource, and on the setting tab in the structure simply add Detailed entries. And of course not forget to put Product and number In the selected fields. And for complete happiness, we will arrange ordering by the goods.


As a result of the execution of the report with such settings, I get this table.

As we see, the lamp that is in both data sets is represented as a result of the query with two lines. To minimize them in one line, it is necessary to change the structure slightly sCD settings and instead of detailed records to make a group of field Product.


And now we get the result without a row row.