Released in 1C:Enterprise 8.3.6.
We have implemented an ability to receive simply and conveniently data displayed using the dynamic list.
Dynamic list data can be useful for you in order to print them in non-standard, “specific” form. Or in order to perform some actions with them. For example, to send a letter for all contractors you have selected in the list according to some attributes.
In addition, there are a number of tasks in which the user, in addition to the list of items, wants to see the result data associated with this list. For example, by selecting the goods of some commodity group and specific vendor, he wants to see at once a general number of these goods in the base.
Dynamic list by itself cannot provide for you such information. The task of dynamic list is to provide a quick view of large data volumes. Therefore, it reads data by portions required to display on one-two screens. And it “knows nothing”, for example, about total number of data it need to read.
In general, to receive an additional information that the user wants, you need to execute a database query. Exactly the same that is used in the dynamic list.
Previously, you could do this. But it was not always easy. In fact, in addition to the text of initial query according to which the dynamic list operates, you needed to know all the samples, sorting and other parameters the user had interactively set in the table which displays data.
Now this problem is solved easily. The dynamic list table has two new methods:
- GetPerformingDataCompositionScheme();
- GetPerformingDataCompositionSettings().
Thus, you obtain data composition scheme by itself and, most importantly, all its settings thanks to which the user sees the list exactly so. You only need to compose template programmatically and output it in the value collection (for software processing) or in the spreadsheet document (for displaying):
As a result, you will get a structure (or report) which contains the columns and rows that are output in the table of dynamic list.
The important point as that the scheme and settings that you obtain from the dynamic list table take into account, among others, a visibility of columns and applied search. Since the settings are obtained separately, you can change for your purposes the composition of fields and obtain, for example, all the list columns, but not only those that are visible for the user.
When you output in the spreadsheet document, there is another nice moment. In general, the external report view will correspond to the external view of dynamic list table at the time of receiving scheme and settings, as well as to the conditional table appearance. You will need any other additional actions only in case if you want to move in report the conditional form appearance.