SD editing options. Features of creating reports (1Cv8). Features of creating reports via access control system

The tab replicates the custom “Settings” dialog, available for the user to configure report parameters.

Filling in the settings on this tab is used to configure the default report in the user mode of the report.
The window for setting up the report is available in the custom report mode, and the difference from setting up the ACS in the configurator is that you can use the values ​​of non-predefined data from the database.
The settings window consists of a main window where lists of groupings, tables and charts are displayed and a set of tabs in which settings parameters are set for objects specified in the groupings section. We can indicate which settings are currently being edited by clicking on the button with the inscription about what object we are editing:

It is possible to edit general settings for the entire report, and by clicking on the corresponding button you can edit settings exclusively for the selected object: grouping element, table, chart.

Tab "Data parameters"
On this tab, the values ​​of data parameters are set. The list of available data parameters is determined on the “Parameters” tab of the ACS diagram; only user-defined parameter values ​​are set here. Moreover, only those parameters are available for which the “Restricted availability” checkbox is cleared in the access control scheme.


The table contains several columns:
1. “Use” - by ticking the user indicates whether or not to use this parameter to generate a report.
2. “Parameter” - parameter name
3. “Parameter value” - the value of the parameter or an indication from where the value of the parameter can be retrieved. For example, if you reset the current value by clicking on “X”, then clicking on the “T” button will open the selection of the parameter type in the dialog:

The source can be any value of a simple type String, Date, Number, Boolean or a link to an object in the database. The source for this parameter can also be the value of another parameter; to do this, select the value “Data composition field” and select the desired field from the list of parameters.
For dates, you can assign automatic values ​​for substitution: “Start of this day”, “Start of this week”, etc.

“Selected Fields” Tab
On this tab, you define the fields, except for groupings, that will be displayed in the report. The tab contains two lists with available fields and selected fields. In addition to the fields defined in the data sets, parameters and system fields “Sequence Number”, “Sequence NumberInGrouping”, “Level”, “LevelInGrouping”, as well as custom fields defined on the “Custom Fields” tab are available for output.

You can transfer fields by double-clicking on the name in the left window or using the special button in the command panel. You can add the following elements: “New field”, “New group”, “New autofield”. “New Field” - adds an element in which you can select a field from the available list of fields. “New group” - you can group a number of fields under one heading. “New autofield” - is used to indicate that the fields displayed for groupings will be selected from the grouping settings of a higher level. For example, having defined a number of resource fields for the entire report, we specified a new autofield for groupings. You can delete elements using the Delete button, or move them by position using the move buttons. By checking the boxes you can adjust the visibility of fields in the report.
After defining a set of fields, we can edit the fields in the list; we need to enter the field editing mode, click on the select button and select the desired field from the list.

For resources, clarifications for attribute calculations are available for selection: “% in group” - used to calculate the share of the resource value for the entire grouping in the group, i.e. as a result, the group based on the totality of resource values ​​will be 100%; “% total” - the total percentage, regardless of the group, for all resource values.
For object type fields: directory, document, etc. It is possible to specify object details in the selected fields.

Tab "Selection"
On this tab, you define selections that affect the result of the report.


As on the “Selected Fields” tab, there are two windows: on the left are all available ACS fields for selection in the selection, on the right are elements and values ​​that affect the selection. You can also add a new element or group of elements using the Add button. You can delete elements using the Delete button, or move them by position using the move arrows. By checking the boxes you can regulate the activity of a particular selection in the report. After clicking the “Similar” button, clarifying selection details are added to the list of selection elements: “Display mode” and “Presentation”.

After adding a new element to the selection list, the following fields are available for editing:
“Left value” - ACS field or a simple type field (“Number”, “String”, “Date”, “Boolean”), on which selection is applied
“Comparison type” - a list of possible selection conditions: “Equal”, “Not equal”, “In the list”, “In a group from the list”, “In a group”, “Not in the list”, “Not in a group from the list”, “Not in group”, “Contains”, “Does not contain”, “Filled”, “Not filled”
“Right value” - selection value, corresponds to the value of the “Left value” field. If the “Comparison type” is “In the list”, “In a group from the list”, “Not in the list”, “Not in a group from the list”, then a list of values ​​is available for setting
“Display mode” - there are two possible options: “Quick access” and “Normal”. If “Quick access” is installed, then, if possible, the values ​​for selection are displayed in the form of a drop-down list, this is especially true for small, rarely changing directories, enumerations or types of characteristics. “Normal” is the default method of displaying values ​​for objects in the form of a selection form or list.
“View” - a text view of the selection in a shortened mode (if the “Details” button is not pressed), as well as a view of the selection when displaying the report.
You can add groups to selections - which serve to combine several selections, according to any criterion “AND”, “OR”, “NOT”.


For example, you need to combine several conditions using the AND operator. To do this, you need to add “Group AND” to the selection and list the conditions in this group. Nesting of groups is allowed, with the help of which you can create complex conditions. In addition to “Group AND”, “Group OR” and “Group Not” are available. By default, there is simply a list of selection conditions that does not belong to any group, connected to each other using the “AND” operator.

“Sorting” tab
This tab specifies the fields by which sorting is performed.


Adding fields on this tab is similar to how it is done on the “Selected Fields” tab. The only parameter that is specified in the selected sort fields is the sort direction.

Tab “Conditional appearance”
On the “Conditional Formatting” tab, we indicate which fields, selection conditions and registration conditions will be applied when displaying fields in the report.


“Area” is a list of fields that are affected by the conditional appearance.

“Selection” - selection conditions under which conditional registration is valid

Selection conditions are specified in the same way as on the “Selection” tab of the main layout settings window.
“Conditional design” - when you fill out this field, a window is displayed with a choice of possible design options for the specified fields.

List of possible design options:
Background Color - Defines the background color of the cells.
Text Color - Defines the color of text in cells
Chart Color - Defines the color of the lines in the chart.
Border color - Border line color
Border Style - Border Line Types
Border style left - left
Top Border Style - Top
Border style right - right
Bottom Border Style - Bottom
Font - Type of font, thickness, slant, etc.
Indent - Number of indentation characters
Auto indent - Number of indent characters, used in groupings
Horizontal Position - Horizontal position of text in a cell
Vertical Position - The vertical position of the text in the cell
Placement - Place text that does not fit in the cell
Text Orientation - Orientation of the text in degrees (for example, 90-rotate perpendicular)
Format - Format value string
Highlight negative - Sign to highlight negative values
Minimum Width - Minimum cell width in points
Minimum height - Minimum cell height
Max Height - Max Height
Text - The text that is displayed instead of the value

Tab "Custom Fields"
On this tab you can specify custom fields and formulas by which the fields will be calculated.


When you click on adding a field, a selection of the type of custom field will open: “New selection field”, “New expression field”.
“Selection field” - a dialog for constructing a new selection field appears. This field will take the specified values ​​depending on the selection condition specified in the “Options” table.

“Field expression” - used in the case when you need to insert calculated fields without changing the layout scheme. For example, the schema contains the resources “Quantity” and “Amount”. In user mode we want to calculate the price. To do this, we insert the formula into the expression design field:

You can use expressions from queries in custom fields.
Also, to designate total records in an expression, you need to use the aggregate functions SUM(..), QUANTITY(), MIN(..), MAX(..)

“Other Settings” Tab
On the “Other Settings” tab, you define settings that affect the arrangement of groupings, selection fields, resources, etc.

Design Layout Defined predefined design layouts
Totals location The parameter affects the location of totals
Location of grouping fields
Location of factions
Location of details
Resource Location
Horizontal arrangement of grand totals
Vertical arrangement of grand totals
Field header type
Chart type
Base value
Skip base value
Composition of signatures
Sliding mode
Display data table
Maximum value
Minimum value
Edging
Gradient
Font
Background color
Line style
Legend placement
Measurement chart stripes
Display title
Heading
Output data parameters
Display selection

Grouping settings window


The data composition schema settings may contain a structure that includes the available settings elements.
These elements are:
grouping;
table;
diagram;
nested report.

The following settings are available for grouping:
Grouping use flag - if set, grouping is used during layout;
Grouping fields - a set of fields by which grouping is carried out. Each data composition system grouping field has the following properties:
- Field use flag - if set, the field is used;
- Grouping field - path to the field data by which grouping is carried out;
- Grouping type – grouping type (Hierarchy, Hierarchy only, Elements);
- Addition type – the need to add dates in the period;
- Start date - the start date of the period. May contain a constant value or a field value;
- End date - the end date of the period. May contain a constant value, or the value is a field;

When grouping by period field, a parent period field is automatically added to the grouping, which is not an additional period, if the parent groupings did not group by this parent period field.
For example, if grouping is carried out by the Recorder field, then the PeriodSecond field will be automatically added to the grouping.
However, creating groupings based on the details of period fields is prohibited.

Question: SKD, How can I open the required selection form for a parameter?


Good afternoon There is a report on the access control system, it contains the parameter Brand - type Directory.Nomenclature. How can I call a specific selection form for this parameter? I tried in the SKD on the "Parameters" tab, select the desired parameter - double-click on the "Editing Options" column - check the "Selection Form" box and enter the value Directory.Nomenclature.Form.SelectionFormRequired. When running a report, the selection form is still used by default, and not the one specified in the “Selection Form”. UT configuration, usual forms. Tell me, please, where, what is wrong?

Answer: Key phrase Regular forms, switch to managed ones

Question: Select a value on the selection form


Good afternoon

Regular application.

There is a document. It has several details of a reference type, for example “DirectoryLink.Banks”, with the value “Bank1”.

It is necessary in the form for selecting the directory "Banks", programmatically SELECT the element "Bank1", i.e. type re-select this value "Bank1".

So far I've done the following:
Procedure Execute SelectionInSelectionForm(Link)
DirectorySelectionForm = Directories.Banks.GetSelectionForm(,Link); //I receive a form for selecting the Banks directory using the passed parameter Link
//set the selection in this selection form, according to my link in the details
DirectorySelectionForm.Selection.Link.Use = True;
DirectorySelectionForm.Selection.Link.Value = link;
DirectorySelectionForm.FormElements.DirectoryList.HierarchicalView = False;
DirectorySelectionForm.Open();
//here is the code that simulates clicking the Select button, how????
End of Procedure

Help if anyone has encountered this or has any ideas.

Thank you.

Answer:

I did it like this:

Procedure ExecuteSelectionInSelectionForm(Link, rec) //the “link” parameter is a value link on the document form; "rek" - the current form element, i.e. selection field
DirectorySelectionForm = Directories.Banks.GetSelectionForm(,Rec,Link);
DirectorySelectionForm.FormElements.DirectoryList.HierarchicalView = False;
OpenForm(DirectorySelectionForm, rivers,);

If the Directory Selection Form.Open() Then
DirectorySelectionForm.Activate();
endIf;

DirectorySelectionForm.CurrentElement.CurrentRow = link;
SelectionEl = DirectorySelectionForm.CurrentElement.CurrentRow;

If SelectEl = undefined or NOT value filled (SelectEl) then
Report("The value "+Link+" was not found in the directory selection form");
otherwise
DirectorySelectionForm.NotifyOfSelection(SelectEl);
endIf;

End of Procedure

Question: The "Select" button on the selection form or how to click the "Select" button


Good afternoon

Regular application.

What thoughts do you have on clicking the “Select” button on the document/directory selection form?

Clicking the mouse and COM does not offer automation.

Wishlist: in the selection form, simulate pressing the “Select” button.

Answer: Looks like I solved the problem...a couple of runs of the test.

Added after 17 minutes
So far it works like this:

1C
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Procedure Perform SelectionInSelectionForm(Link, rec) //parameter "link" is a value link on the document form; "rek" - the current form element, i.e. selection field DirectorySelectionForm = Directories. Banks. GetFormSelection(, Rec, Link) ; Directory Selection Form. Form Elements. DirectoryList. HierarchicalView = False ; OpenForm(DirectorySelectionForm, rivers, ) ; If Directory Selection Form. Open() Then the DirectorySelectionForm. Activate() ; EndIf ; Directory Selection Form. CurrentItem. CurrentRow = link ; SelectionEl = DirectorySelectionForm. CurrentItem. CurrentRow ; if SelectEl = undefined or NOT value filled (SelectEl) then Report("Value" + Link + "was not found in the directory selection form") ; otherwise, DirectorySelectionForm. Notify About Choice(ChoiceEl) ; EndIf ; End of Procedure

Question: Why is the value no longer selected from the selection form?


There is a field on the document form of the reference type DocumentLink.PaymentOrderOutgoing. When selected, a form for selecting an outgoing payment order opens. Once a value is selected, it is not inserted into the form as selected. At first I thought the selection processing was standard processing and the programmer forgot to register the selection processing. But everything is typical there. Opening the form not programmatically, in the field in which I choose not to conduct any events. What could it be?
--- Message merging, 2 Jan 2018 ---

Another application based on regular forms. The selection form is manageable and opens from a regular window. If you switch back to the normal selection form, then everything is ok.

Answer:

In general, I figured it out. It’s useful to see what comes into the SelectedValue in selection processing. It turned out to be an array. When I went into the selection form, it turned out that there was a Multiple Choice checkbox. I took it off and everything worked.

Question: Please help me set the selection in the directory selection form


When selecting a counterparty, I programmatically transfer the first characters of the name to the selection form. How to programmatically make the first element whose first characters match are activated.

Answer:

elektron said:

When selecting a counterparty, I programmatically transfer the first characters of the name to the selection form. How to programmatically make the first element whose first characters match are activated.

Click to expand...

It's decided. I created a virtual keyboard on the “Counterparties” directory selection form.
When you press any key, the code is triggered
SearchResultByDetails = TechRef.FindByName(N, False);
Form Elements.DirectoryList.CurrentLine=SearchResultByAttributes;
where H is a variable containing the value of the key

Question: Select form with selection for list of values


Good afternoon. I need your help in solving a simple problem.

Confa ZUP 2 .5 .113 .1 There is an external report, the report has the attribute “list of bases”, type list of values.
There is a report form. On the report form, the field "input list of bases", ValueType = "List of Values", and ListValue type = "DirectoryLink.ObjectPropertiesValue".

How to open a selection form with selection by the owner of a property?

Thank you in advance!

Answer: On the Options tab there is a column called Editing Options. There you can try to configure the selection parameter connections or the selection parameter

Question: Programmatically open the document selection form 1s 8.3


How to programmatically open the document selection form 1s 8.3 and save the selected value to a variable?

Google gave some crutch solutions, I would like to know how to do it correctly.

Answer:+ () PM also has a magical method - download.

Tabular section
Load
Syntax:

Download(<Таблица>)
Options:

<Таблица>(required) Type: ValueTable.
A table of values ​​from which the tabular part is loaded. Table columns are combined by names.
Description:

Loads the tabular part from the value table. In this case, all previous rows of the tabular part are deleted. When loading, the values ​​in the columns of the table section are filled with values ​​from the columns of the value table with matching names.

Availability:

Server, thick client, external connection.
Note:

The method can only be used if the table part is obtained from an object property. If the table part is obtained from a reference (or selection) property, then using this method will cause a runtime error.
Example:

Composition.Load(CompositionTable);

Question: Passing parameters to the selection form.


Please help me.
From the document "Sales of goods and services" the contract selection form (ERP) is called up. The conf is edited, I compare it with the standard one. In ProcessingCreationOnServer of the selection form, I look in the debugger Parameters.Selection. I just can’t understand how the selection list is formed - there is no explicit call to this form with parameters, there is only one selection element in the “SelectionParametersLink” property, and there are already several in Parameters.Selection. Maybe someone can tell me where to look.

Attention! This is an introductory version of the lesson, the materials of which may be incomplete.

Login to the site as a student

Log in as a student to access school materials

Data composition system 1C 8.3 for beginners: connecting data sets

  • Write a report that displays customers and their favorite products. Each client has a favorite color, and each product has its own color - based on these colors, you need to determine the “favorite” of the product. For example, if Andrey’s favorite color is red, then one of his favorite foods will be tomatoes (they are red).
  • Apply two sets of data in the report. The first set is data from the "Clients" directory table. The second is data from the “Food” directory table.
  • Implement connection between these two sets, so that the report contains only the favorite products for each client.

Create a new report

Open the "Gastronom" database in the configurator and create a new report through the main menu:

Document type - "External report":

In the form of a new report, indicate the name “Lesson 6” and click the “Open data composition diagram” button:

Leave the default schema name:

Adding the first data set

In the diagram that opens, go to the “Data Sets” tab and select “Add Data Set - Query” using the green plus sign:

Call the request constructor:

We indicate the "Customers" table and the fields that need to be obtained from the request:

Adding a second data set

Add a second set of data:

Select it (DataSet2) and call the query constructor again:

We indicate the table of the "Food" directory and the fields that need to be obtained from the request:

The resulting request text was:

Please note that we currently have two data sets in the report: Data Set1 and Data Set2. Each has its own request text and data.

Making names more descriptive

For clarity, let's rename DataSet1 to Customers and DataSet2 to Food.

Do this by double clicking on each of the sets:

We can use the data from each set in our report. We will access this data through fields.

Currently, the “Customers” set has the following fields: “Name” and “FavoriteColor”, and the “Food” set has: “Name” and “Color”.

We see that the names overlap and we can easily get confused. So let's change the field names to be more descriptive.

Select the “Clients” set and change the field names like this:

Then select the “Food” set and change the field names like this:

Calling the settings constructor

Finally, go to the “Settings” tab and click the magic wand to bring up the settings designer:

Report type - "List...":

Select fields for the report from both sets:

See why it was so important to change the field names? At the stage of data composition settings, we do not see which sets these fields are from. We only see their names.

Checking the report

We save the report and generate it in user mode:

Yeah. Okay, but not really. A so-called cross-join of two sets has occurred (you should be very familiar with this from the joins in queries that we studied in previous modules). Each record from the Customers table has a corresponding record from the Food table.

But from all these records we need to leave only those whose field “Customer’s FavoriteColor” is equal to the field “FoodColor”:

We connect two sets of data

To do this, we will connect two sets of data (Customers and Food) using the fields Customer's FavoriteColor and FoodColor.

Go to the “Data Set Links” tab and click on the plus button to add a new link:

We configure the parameters as in the figure below:

I'll make an explanation.

Source and receiver of communication. Well, everything is clear here. We indicate the first set (Customers) and the second set (Food) of data. I would like to draw special attention to the fact that communication will be carried out according to the principle outer left join(we covered it in the topic of requests in previous modules). Based on this, you need to choose which set will be the source and which the receiver.

Expression source. We indicate here an expression or simply a field from the source data set (we specified the ClientFavoriteColor field from the Clients set here).

Receiver expression. We indicate here an expression or simply a field from the receiver data set (we indicated the ColorFood field from the Food set here).

Thus, this connection will leave from the previous list only those rows for which the Customer's FavoriteColor field is equal to the FoodColor field.

Let's save the report and run it in user mode:

Great!

I'll make an explanation about the field " Communication condition", about which novice programmers so often hit their spears.

The connection condition is an auxiliary field. You can write expressions there involving fields only from the data set specified in the link source.

In this case, for all rows from the link source, this expression (link condition) will be checked before the link is made. And if this expression is TRUE, then an attempt will be made to establish links between this row and rows from the link receiver. If the expression is FALSE, then no such attempts will be made.

In the query designer, 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 the query designer, 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. Typical configurations actively use the mechanism of properties and property values, available for almost any object. Primitively, in reference books, this mechanism was implemented in configurations 7.7. Now this mechanism is implemented using a plan of characteristics types and an information register, but the idea remains the same. When I first encountered the need to use this mechanism in an access control scheme, I struggled for a very long time, organizing nested queries, joining them to the main selection and racking my brains over how to take into account the possibility of the emergence of new types of properties that did not exist at the time of report development. The entire mechanism of properties, being simple and logical from the user’s point of view, 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 refuse to enter the line at all; the system will not allow you to leave an incompletely filled line “for later.” 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 “DirectoryLink.Nomenclature” This means that now for all objects of the specified type it will be possible to obtain property values. Next, in the next column Source of views, we must set the parameters of the source of property views. The table and query options are possible; I’ll tell you why the query option is needed later, now let’s select the table item. In the Types of characteristics column, we must select the infobase table in which the required types of characteristics are stored, in our example it will be “Plan of Types of Characteristics.Properties of Objects”. Further, the values ​​available to us for selection in the Key Field, Name Field and Value Type Field columns directly depend on the fields of the table we have selected. In the Key Field we select Link, in the Name Field – View (this is what the user will see as the name of the attribute), and in the Type Field, respectively, ValueType. Now let's move on to the source of values. Our source of values ​​will be the information register “ObjectPropertyValues”, so we select table in the Source of Values ​​column, and “InformationRegister.ObjectPropertyValues” in the Characteristic Values ​​column. In the columns Object, Property, Value, select the corresponding fields of the Object, Property, Value register. It would seem that that's all. We go to the schema settings, add a grouping by products, and add a subordinate grouping, for example by Brands, we have such a property. We expand the list of details of the Nomenclature grouping and... we don’t see any properties there: The fact is that we are in the configurator, from where there is no access to the data. How to make the necessary settings? The most convenient way to do this is to use the data composition console, the one on the ITS disk, or the one included in the “Developer Tools” subsystem. But you can simply open the report settings in enterprise mode. So, let's open the same setting, but in enterprise mode: As you can see, we have added new “Details”, and...
Did you like the article? Share with friends: