The peculiarity of using the mechanism of characteristics in skd. Useful Data Composition Schema Examples Data Composition Expression Language

An example will be given on the configuration "Manufacturing Enterprise Management" version 1.3. In the infobase, for all elements of the "Organizations" directory, the properties "Main warehouse", "Associated counterparty" and "Country of location" have been added. We need to create a report in the data composition system (SKS), in which we can impose a selection on additional characteristics of organizations.

In this case, we will use the standard ACS functionality to work with the characteristics of objects. We will also consider a feature of developing such reports, namely, the inability to use additional characteristics in the data composition schema constructor in the "Configurator" mode. The latter does not allow the use of characteristic fields in setting up output fields in the report, selections, grouping in the report structure, and so on.

Create a report and set up characteristics

Let's create a simple report. It will have one dataset with the following query:

QueryText = " SELECT | Organizations . Link AS Organization,| Organizations . TIN,| Organizations . checkpoint |FROM Directory" ;

The report structure will only display detail records with all fields selectable in the query. In the constructor, the report structure setting will look like this:

The screenshot below shows the output of the report with the current settings.

Great. Now let's move on to setting the characteristics, but before that I will remind you in general terms of the operation of the characteristics mechanism in most typical configurations, including soft starters. Several configuration objects are used for this.

  1. Plan of types of characteristics "Properties of Objects".
  2. Information register "ObjectPropertyValues".

Graphically, the relationship between an infobase object and its characteristics can be represented as follows:

Let's describe the scheme in more detail. The "ObjectPropertyValues" information register in the "Object" dimension contains a reference to the infobase element for which the property is stored. In our example, this is a link to the "Organizations" directory element. All possible properties of an object are defined in the plan of types of characteristics (PVC) "Properties of Objects". The characteristic value stored in the information register depends on the available data types for the characteristic type plan element recorded in the Property dimension. This description should only give a general idea of ​​the mechanism of the add. properties. In practice, it is more difficult.

Now let's move on to setting the characteristics in the data composition schema. To do this, launch the query builder and go to the "Characteristics" tab. Here you need to add a field for linking the infobase object with tables of properties and property values. Earlier, we considered the scheme of communication between configuration objects for storing additional. properties/characteristics. Based on this information, the setup will be as follows:

After that, the request for a data set will be supplemented with instructions for obtaining the characteristics of objects.

" CHOOSE | Organizations . Link AS Organization,| Organizations . TIN,| Organizations . checkpoint |FROM| Directory . Organizations AS Organizations | // Add. instructions for obtaining characteristics |(SPECIFICATIONS| TYPE (Handbook. Organizations) | TYPES OF CHARACTERISTICS Plan of Types of Characteristics. PropertiesObjects | FIELD KEY Link | FIELD NAME Name | FIELDVALUETypeValue | VALUES OF CHARACTERISTICS Register of information. ValuesPropertiesObjects | FIELD OBJECT Object | POLEVIDA Property | USEFUL Value )"

That's all. The report functionality now allows you to select fields of additional characteristics in the report (output fields, filters, etc.). But there is one BUT. We can use these fields in report settings only in 1C:Enterprise mode. In the configurator, we cannot see the characteristics fields, which is logical, because the characteristics are entered by the user and stored in the infobase.

But if there is a need, we can add characteristic fields, for example, to the selection before opening it. Let's consider a small example.

Programmatic work with characteristics

When opening the report form, execute the following program code:

CurrentSettings = SettingsComposer. Settings; Selections Collection = CurrentSettings. Selection. Elements; // Adding selection by add. requisites of the item "Main warehouse". [ Main warehouse] // Adding selection by add. requisites of the nomenclature "Country of location" NewEl = Selections Collection. Add(Type(" Data Layout Selection Element" ) ) ; NewEl.ComparisonType = DataCompositionComparisonType. Equals; NewEl.LeftValue = . [ Location country]" ) ; NewEl. Usage = False ; // Adding selection by add. requisites of the nomenclature "Associated counterparty" NewEl = Selections Collection. Add(Type(" Data Layout Selection Element" ) ) ; NewEl.ComparisonType = DataCompositionComparisonType. Equals; NewEl.LeftValue = NewDataCompositionField(" Organization . [ Related counterparty]" ) ; NewEl. Usage = False ;

Then if we look at the report selection in the 1C:Enterprise mode, we will see the following picture:

Thus, we programmatically added selection by additional characteristics of the "Organizations" directory, despite the fact that these fields were not available in the ACS constructor. Notice the syntax for defining a data composition field.

New DataCompositionField(" Organization . [ Related counterparty]" ) ,

namely, the text "[Related counterparty]". If we write like this:

New DataCompositionField(" Organization . Related Counterparty" ) ,

then, when running the report, the ACS will incorrectly determine the layout fields. In the settings, the selection fields will be highlighted as incorrect:

For additional properties and attributes that are not available in the ACS constructor, the following syntax must be used when programmatically accessing:

New DataCompositionField(" . " )

Thus, we can set report settings even if the fields are not available in the ACS constructor.

Conclusion

Using the characteristics setting in the ACS makes it possible to significantly simplify the development of complex reports. Despite some shortcomings in the work, such as the inability to configure the selection for additional. properties in the constructor, etc., the characteristics mechanism can be considered a significant step in simplifying the development of reports in the 1C:Enterprise system.

In the article, we have considered far from all the possibilities of characteristics in ACS. The following possibilities remained outside the scope of the article: arbitrary definition of data sources, both for properties and for characteristic values, as well as selection by owner for all available characteristics in the infobase, and much more. The topic is large, there is much to expand the circle of their knowledge.

Sometimes it happens that the data in the report cannot be obtained using a query or a combination of queries. You have to use some procedures to collect data, and the data is placed in a table of values. The question arises - can this data be used in the data composition schema? After all, the SKD tool is powerful and convenient. It turns out that it is possible to use data from the table of values ​​as a data source for a report in ACS and it is not at all difficult to do so. This article will show how to create such a report for regular forms.
So how do you create an SKD report using data from a value table? About everything in order.
First of all, open the configurator and create a new external report.

Open the object module and create a predefined procedure OnResultComposition(ResultDocument, DecryptionData, StandardProcessing)

Inside this procedure, we will collect data and generate a report.
In the procedure WhenComposingResult, we disable standard processing. StandardProcessing = False;
Then we form a table of values ​​in an arbitrary way. The names of the columns of the table of values ​​must match the future fields of the data set in the ACS.:


For example, let's add three rows of data. Next, we create the report output step by step.

  • From the scheme we get the default settings.

  • We send decryption data to the corresponding variable.

  • We form the layout using the layout builder.

  • We pass the scheme, settings and decryption data to the layout layout.

  • We perform linking using the link processor. To do this, execute the data composition processor's Initialize() method. As parameters, we pass the data composition layout, external data sets (type: Structure, the key of the structure must match the name of the object in the data composition scheme, the value is the generated table of values), decryption data.

  • We clear the field of the spreadsheet document.

  • We display the result in a spreadsheet.
The result is the following code:
DataCompositionSchema = GetLayout( "BasicData Layout Schema"); //Settings = DataCompositionSchema.DefaultSettings; // - If you do as shown above (recommended on some resources), then when you change the settings in client mode // you will not see these changes, because the settings will always be by default. How to do it right - below Settings = Settings Composer. GetSettings(); DecryptData = New DataCompositionDecryptData; Layout Layout Builder = New Data Layout Layout Layout Builder; LayoutLayout = LayoutComposer. Execute(DataCompositionScheme, Settings, DecryptionData); ExternalDataSet = New Structure( "ExampleValueTable", TZConclusion); DataCompositionProcessor = New DataCompositionProcessor; DataCompositionProcessor. Initialize(LayoutLayout, ExternalDataSet, DecodeData); DocumentResult. clear(); OutputProcessor = New OutputProcessorofDataCompositionResultIntoSpreadsheetDocument; Output Processor. SetDocument(DocumentResult); Output Processor. Output(DataCompositionProcessor); Add layout layout layout. We can leave the name as default.

We create a dataset. To do this, we add a new data set of the Object type. In the Name of the object containing the data field, we place the name that we specified as a key when creating the ExternalDataSet structure. Then we add fields. The names must exactly match the names of the columns in the value table. Next, we can specify valid values, formats, etc.

Add resources if necessary. They will count the results. In our case, these are the Quantity and Amount fields.

In the Settings tab, using the settings constructor, we form the default version of the report

We save our report. We launch it in the client and form it. An example of executing an ACS report using data from the table of values ​​is shown in the picture.


That's all. Simple enough, right?

The resulting report for an example can be downloaded

In the query builder, when it is called from the data source setup form, for the data composition schema. There is a “characteristics” tab, the use of which is not clearly described in the documentation. In this article I will try to explain how and why characteristics are used in ACS.

In typical configurations, the mechanism of properties and property values ​​is actively used, which is available for almost any object. Primitively, in reference books, this mechanism was implemented in 7.7 configurations. Now this mechanism is implemented using a plan of types of characteristics and a register of information, but the idea remains the same.

When I first encountered the need to use this mechanism in the ACS scheme, I suffered for a very long time, organized nested queries, attached to the main selection and puzzled over how to take into account the possibility of new types of properties that did not exist at the time of report development. The whole mechanism of properties, being simple and logical from the point of view of the user, did not lend itself to any normal processing until I figured out the “Characteristics” tab.

The table on the tab is very capricious, either you enter the entire line correctly, or you refuse to enter the line at all, the system will not allow you to leave “for later” a line that is not completely filled.

So, let's get down to specifics. First column: Type– here we select the type of object to which the characteristics will be attached, for example “DirectoryReference.Nomenclature”

This means that now it will be possible to get property values ​​for all objects of the specified type.

Further in the next column Species Source we have to set the property view source parameters. Possible options table m request why do you need an option request I'll tell you later, now select the item table.

In a collumn Types of characteristics we must select the infobase table that stores the required types of characteristics, in our example it will be “Plan of Types of Characteristics. Properties of Objects”.

Next, the values ​​​​available to us for selection in the columns Key field, Name field And Value type field, directly depend on the fields of the table we have chosen. IN Key field we choose Link, V Name fieldPerformance(the user will see it as the attribute name), and in Type field respectively TypeValues.

Now let's move on to the source of values. The source of values ​​will be the information register “Values ​​of ObjectsProperties”, so we select in the column Source of valuestable, and in the column Characteristic values– “Register of Information. Values ​​of Properties of Objects”. in columns An object, Property, Meaning, select the appropriate fields of the register An object, Property, Meaning.

It would seem that this is all. We go into the scheme settings, add a grouping by products, and add a grouping subordinate to it, for example, by Brands, we have such a property.

We expand the list of attributes of the Nomenclature grouping and ... we do not see any properties there:

The fact is that we are in the configurator, from where there is no access to data. How to make the desired setting? The most convenient way to do this is to use the data composition console, the one on the ITS disk, or the one that is included in the “Developer Tools” subsystem. But you can also just open the report setup in Enterprise Mode.

So, let's open the same setting, but in enterprise mode:

As you can see, we have added new “Details”, while the property “ Brand” outwardly does not differ from the usual details of the directory. And the property " Product type” is in square brackets, this is because the property representation contains a space.

However, we also have the property “ Contract type” which is linked to the directory “ Agreements"and has nothing to do with" Nomenclature“. If not used in setting “ Contract type” then everything will work correctly, but if you select it, then as a result it will turn out to be empty, because this property is really not filled for any item in the nomenclature. But how to filter out unnecessary properties so that they do not “get under your feet”?

To do this, we need to change the view source setting, in the query constructor, on the “Characteristics” tab. Remember, at the beginning of the article I promised to tell you why you need a view source type request? Now is just such a case. Change the view source type to request. In the column types of characteristics, press the button “[…]” and a new window of the query designer opens.

Enter the following query there:

CHOOSE
PropertiesObjects.Reference,
Object Properties.Name + ” (property)” AS Name,
PropertiesObjects.ValueType
FROM
Plan of ViewsCharacteristics.Properties of Objects AS Properties of Objects
WHERE
Properties of Objects. Assignment Properties = VALUE (Plan of Types of Characteristics. Assignments of Properties of Object Categories. Reference_Nomenclature)
AND (NOT ObjectProperties.DeletionMark)
AND (NOT Object Properties.Category)

in columns Key field, Name field And Value type field, select the appropriate selection fields: Link, Name And TypeValues. It will turn out like this:

Now, when we move on to setting up the report, the picture in the list of Nomenclature details will change:

Now the product has only those properties that are assigned to it, moreover, they are now noticeably different from the usual details, thanks to the postscript (property), which we added to the property name in the request.

This is actually all, but many may be confused by the impossibility of setting in the configurator. In fact, there is nothing to worry about. It is enough to save the setting (or the entire scheme) to a file, and restore it in the configurator.

The configurator will display the details that are incomprehensible to him with red crosses as inaccessible:

But this is no longer scary, because a report with such settings can be saved in the configuration and it will work correctly when opened by the user.

Access control and management system(ACS) - a set of compatible hardware and software aimed at restricting and authorizing the access of people, vehicles and other objects to (from) premises, buildings, zones and territories.

ACS includes:

Standardization

  • In Russia, there is a state standard for ACS: GOST R 51241-98 ("Means and systems for access control and management. Classification. General technical requirements. Test methods.").
  • In the industry, there are well-established standard ways of solving certain problems. These include the use of EIA-485 (RS-485) for data transfer between controllers and software, the use of Wiegand or 1-Wire protocols for data transfer from the UVIP to the ACS controller.

Place of ACS in an intelligent building

ACS can be interfaced with other automation systems, for example

  • With the Video Surveillance system for combining archives of system events, transmitting notifications to the video surveillance system about the need to start recording, turn the camera to record the consequences of a recorded suspicious event.
  • With a fire and security alarm system to restrict access to guarded premises, to automatically remove and arm premises, to automatically unblock the control panel in case of a fire alarm.

At especially critical facilities, the network of ACS devices is performed physically unconnected with other information networks.

Links

  • GOST R 51241-98 ("Means and systems for access control and management. Classification. General technical requirements. Test methods.")

Wikimedia Foundation. 2010 .

See what "SKD" is in other dictionaries:

    SKD- social and cultural activity SKD synthetic rubber divinyl Dictionary: S. Fadeev. Dictionary of abbreviations of the modern Russian language. S. Pb.: Politekhnika, 1997. 527 p. SKD balance final debit accounting. fin…

    SKD RF- SKD SKD RF Union of Concert Workers of the Russian Federation, music, organization, RF SKD Source: http://news.mail.ru/news.html?396588 ... Dictionary of abbreviations and abbreviations

    SKD-L- divinyl synthetic rubber on a lithium catalyst, oil, chem. Source: http://fs.rts.ru/content/annualreports/517/3/godovoy report 2009 eng.pdf … Dictionary of abbreviations and abbreviations

    SKD-N- divinyl synthetic rubber on neodymium catalyst Source: http://www.avias.com/news/2004/06/16/79836.html … Dictionary of abbreviations and abbreviations

    SKD- Abbr.: Simulation of ebullient activity. This is the name of the Department of Social and Cultural Activities at the Humanitarian University of Trade Unions (Fuchik St., 15) ... Dictionary of the Petersburger

    SKD- self-propelled harvester double-drum beet harvester disc supercritical pressure synthetic rubber divinyl access control system access control system Council of Peasants' Deputies Union of Constitutional Democrats (RF) ... ... Dictionary of abbreviations of the Russian language

    SKD Full name Football club SKD Samara Founded in 1989? Competed ... Wikipedia

    SKD Full name Football club SKD Samara Founded in 1989? Competition second league, zone "Center" 1995 15 ... Wikipedia

    RNMCNT and SKD- RSMTs NT and SKD Republican Scientific and Methodological Center of Folk Art and Social and Cultural Activities named after A.E. A.E. Kulakovsky Yakutsk, RS (Y) http://rnmc.ykt.ru/​ Yakutsk, education and ... ... Dictionary of abbreviations and abbreviations

    RSMC NT and SKD- RNMTsNT and SKD RNMTs NT and SKD Republican Scientific and Methodological Center of Folk Art and Socio-Cultural Activities named after A.E. A.E. Kulakovsky, Yakutsk, RS (Y) http://rnmc.ykt.ru/​ Yakutsk, ... ... Dictionary of abbreviations and abbreviations

Books

  • , Deev V.I. Category: Textbooks for universities Series: Universities of Russia Publisher: URAIT, Manufacturer: URAIT,
  • Nuclear reactors with water of supercritical pressure (bases of thermal calculation). Textbook for universities, Deev V.I. , Thermodynamic cycles and thermal diagrams of nuclear power units with nuclear reactors of the 4th generation VVER SKD are considered. The main characteristics and designs of this type are given ... Category: Textbooks: add. benefits Series: Universities of Russia Publisher:

Good day, dear readers of the blog site! Last time, we already touched on the topic, which talked about the use of the function. And today, in the first of this series of articles, we will learn what are data composition field roles for, and also consider examples of filling these roles.

The role of the SKD field indicates what is this field. Each field role can contain its own property. For example, it has a numeric value and contains the number of the period, if the field is a period. If the value of the "Period" property is 0 (zero), then this means that this field is not a period. Or the "Dimension" property - contains a sign that the field is a dimension. If the field is a dimension, then this information is used when calculating the totals for the remainder fields.

You can specify a role for each data composition schema field. Roles affect the correctness of the calculation of residuals. In particular, the initial and final balance for some table. If the virtual table "Balances and Turnovers" is selected in the query, then the initial and final balances are calculated according to a complex algorithm, especially if we use additional reversals by period.

But if all this works correctly in queries, according to the set of output fields, then things are a little worse in data composition. After all, we do not know which fields the user will actually select. Everything will depend on the configuration of his version of the report, which he can change at any time. Therefore, the data composition system has its own mechanism for calculating the initial and final residuals for a certain data set, and roles are used accordingly for this. Let's open it up and see that each field can be assigned roles.

Let's add a query dataset. To do this, we need to make the root element "Query Builder" active. Let's turn to the virtual table "Balances and Turnovers" of the accumulation register. What do we see?

As you can see from the illustration above, we can see that for some fields the role has been filled. This happened because we have the "AutoComplete" flag set. But this is not always possible, so sometimes you have to set the role manually. Let's see a couple of examples.

Let's assume that in the query we use , for example, we use the query language operator "SELECT". Let's describe this condition:

CHOICE WHEN Remains of Goods Remains and Turnovers.Nomenclature = Value(Catalog.Nomenclature.EmptyReference) THEN Value(Directory.Nomenclature.Shampoo) ELSE Remains of GoodsResidualsAnd Turnovers.Nomenclature END

This entry means that if the nomenclature corresponds to a null reference (we refer to the function value reference "Nomenclature", a null reference), then the value of the predefined element will be returned. Let's assume that in our configuration there is such a predefined element and it is called "Shampoo". Otherwise, we return the value of the item itself. We get the following:

As you can see, for the "Nomenclature" field, the role was not filled. But as you can see in the image, in fact, we do not have a role set for the “Field1” field, and in this case the remainder will not be correctly calculated.

There are other examples where the role cannot be set on its own. For example, this is the use of , that is, a certain table of values ​​is supplied as input, for example, loaded from another database, and the remainder must be calculated from it. In this case, we must assign roles ourselves. How this is done, we will consider in.

At the end of the article I want to advise you free from Anatoly Sotnikov. This is a course from an experienced programmer. He will show you on a separate basis how to build reports in the ACS. You just need to listen carefully and remember! You will receive answers to questions such as:
  • How to create a simple list report?
  • What are the Field, Path, and Title columns on the Fields tab for?
  • What are the restrictions on layout fields?
  • How to properly set up roles?
  • What are the roles for layout fields?
  • Where can I find the data layout tab in a query?
  • How to configure parameters in SKD?
  • Further more interesting...
Perhaps you should not try to surf the Internet yourself in search of the necessary information? Moreover, everything is ready for use. Just get started! All the details about what is in the free video tutorials