the Internet Windows Android

SCD selection. Use of selections in LCD

Expanding query language for data layout system

Expanding the query language for the data layout system is carried out using special syntactic instructions enclosed in curly brackets and placed directly to the text of the query.

Syntax elements for expanding the data layout system query

CHOOSE

This proposal describes the fields that the user can choose to output. After this keywords Through the comma, the pseudonyms of fields from the master list of the query sampling that will be available for configuration are listed.

For example:

(Select Nomenclature, Warehouse)

After the pseudonym, the field can be a combination of characters "*", which means the possibility of using child fields from this field.

For example, an entry nomenclature. * Indicates the possibility of using subsidiaries of the field "Nomenclature" (for example, fields "nomenclature. Code"). The selected item may be present only in the first association request.

WHERE

Fields are described to which the user can apply selection. This proposal uses table fields. The use of aliases of the sampling list fields is unacceptable. Each part of the combination may contain its own element where.

(Where the nomenclature *, warehouse)

Suffen example

It is necessary to get sales for the period + to derive the entire nomenclature, regardless of whether there were sales or not. That is, you need to select data from the price of the sales register, data from the directory nomenclature. We lower the question why we need the whole nomenclature.

To solve the problem, you can make a request that connects the left compound the nomenclature and the sales table of the sale, as a result, for a nomenclature that was not sold in the selected period, we get the values \u200b\u200bof the fields Counterparty, Treaty, number, Sum \u003d NULL. Such a request:

Choose Sprnomenclature. Link as Nomenclature, Receive. Contractorgent, Receive. Sign-Bulk Tragant, Receive. Rights. Doctor as Number, Receive. Incenostobota As a Cost from Directory. NameNeture as a Sprnomenclature Left Connection of the Register. Sale

Here is the result:

Counterparty Treaty Nomenclature number Sum
NULL nULL _Test1 nULL nULL
LLC "Rog and hooves" Contract1 Slippers 10 1200
"Gazprom" Cool contract Boots 5 13000
nULL nULL Galoshi nULL nULL
nULL nULL Shale nULL nULL

IN this example There was no sales of the nomenclature: "Galoshi" and "shale"

And anything, if we grouped a sample on the counterparty, the entire non-selling nomenclature will fall into a separate grouping, where the counterpart \u003d , but the client wants to have an arbitrary selection on the counterparty field (naturally mean a counterparty from the sale register). How to be? After all, in essence, we need to filter only the table Sales. If we use autocomplete in the designer of the CCD, then the field will get the field Counterparty, everything seems to be good, but when executing a report with the selection according to the counterparty, we will lose all records from the connection with the nomenclature. For example, install the selection: Counterparty \u003d LLC "Rog and hooves". The result will look like this:

Not at all what we need, right?

To solve the task, you can of course add a parameter to a request, for example, in the parameters of the virtual table ReceivedBut at the same time the flexibility of the type of comparison type is lost.

The solution is: for this in designer requests On the tab Data layout => Tables Add a field condition to the conditions of the virtual table Received and change him alias on Counterpartybor.

In order not to confuse the user with the selection fields, turn off the condition field Counterparty and change the header for the field Counterpartybor.


As a result of the execution of this scheme with the on-selected partition, the resulting request will take the form:

Choose a sprounce. Link as a nomenclature, and recesses. Contractor as a counterparty, and reinforcement. CONTRAFTERGENT AS CONTRIBUTURENT TRANSFER, INCLUDESS. COLOR WORLD OBJECT as\u003e Quantity, Requires Sprnomenclature. Representation as a nomenclature representation from the reference book. Nomelaclature as a sprnomensclature Left connection of the regisparnation. Sale. Rotates (& p ,,, counterparty \u003d & p3) How to research on Sprnomenclature. Link \u003d SALES.

And, accordingly, the result:

Counterparty Treaty Nomenclature number Sum
NULL nULL _Test1 nULL nULL
LLC "Rog and hooves" Contract1 Slippers 10 1200
NULL NULL Boots nULL nULL
nULL nULL Galoshi nULL nULL
NULL nULL Shale nULL nULL

Test1 is a group in the Handbook of the Nomenclature, in which everything lies

The Publication is attached to the XML diagram of the report used to publish. The scheme created in the complex automation, but I think everything will work perfectly and in the UPP and in UT 10

Summarizing

This example shows how to create your selection settings in the LCD and turn off the road output if you design the scheme with the flag on Autocomplete.

If you have enough experience to create schemes without using Auto-complete - T. this advice It makes no sense.

Used software

  • Program for creating screenshotsSnimok!
  • XML file editor

Often, programmers for writing treatments had to use requests for data acquisition and subsequent processing. The data in turn was obtained from the request. Well, the request without a selection or filter is rare. Let's talk about selections in such requests, on the query example:

In order to organize the selection along the counterparty for the user in the usual form, the programmer had to place three elements on the form, which looked like this:

How many works should be described by the programmer different types of comparison (equal, not equal, in the list, in group ...) and based on these types of comparisons, refine your end request for data receipt.

Consider how this can be done with the help of the CCD. Create a layout in our processing with the type of data layout diagram and fill it with our request:

On the setup tab, add a new grouping without detailing and, in our example, the counterparty field, as we eventually get everything into the values \u200b\u200btable:

And on the selection tab add to the selection of counterparty:

Now we will deal with form. We bring to the form of processing the selection itself, with which the user will work. On the form, withdraw the element of the type of table field and give it the name of the selection with the data type, the linker. Options. Option:

Now let's create a discontinuing event event handlers and the execute button handler, the code is presented below:

Magnet; The procedure button is advantaged (button) result. Recommend (); Complosing machine \u003d new fold-shirt-cleaner complex; Mockkomponovka \u003d folder-machine. Fill (layout, linker. Pouring settings (), type ("generator-collecting componne-shapedDlacollaccision")); ProcessorComponovka \u003d new processor components; ProcessorComponovka.Initialize (MockComples); Processor Equipment \u003d New processor-in-line results Compact-shaped transactions; Processor Equipment. Set the object (result); Processor exercise. Ensure (processorComponovka); If elementforms. Result. Solonks. Racing () \u003d 0 Then elementforms. Result. Calcons (); Ended; Extrocarbage procedure () layout \u003d reception ("layout"); Source accessories \u003d new source accessoryAnavodaskomkudy (layout); Linker.Initialize (source accessors); Loader. Clipputs (layout. InstallingPoomole); Extrudresses

Processing is ready, running it, you can immediately see it at once in our selection that the counterparty appeared, which can choose any type of comparison, as well as add additional lines of selection for the details of the Directory directory:

That's all, I hope this article will help you improve the flexibility of selections in your handlers.

Kononov Sergey

What can be used?

Well-minded opinion - for reports.

Actually the possibilities of the CCD go beyond the construction of universal reports.

And today we will show how using the CCD, the user will be able to configure flexible data selection.. Next, this selection will be used when receiving and processing data.

For what tasks it will be useful?

Here Examples from typical configurations:

  • Processing "Unloading data to the site"
  • Formation of price list
  • Unloading data in the TSD (data acquisition terminal)
  • Segmentation of goods, partners
  • Formation of orders (customers, suppliers) for needs
  • Repair planning in 1C: ERP.

That is, the tool is useful everywhere, where you need to provide the user with extensive selection capabilities.

Creating an arbitrary selection in a managed form using SKD

The lesson considers working with linker settings Data layout schemes:

  • Sampling
  • Software Communication Linker Settings and Layout Schemes
  • Creating default selections in LCD.

Obtaining data from the base with filtering

The video shows how you can select data using the previously set selection in the settings layout.

Used "scary" object - PERFORMANCEMUCHEMUCHCOMPONDENIEVOLLACOLCTIONS.

In fact, not everything is so difficult - in 8 minutes we solve the task.

Storage of selections of the CCD in the information base

In the lesson, consider saving Linker Settings Using the warehouse of values.

We understand how to solve this problem in the configuration "1C: Management of production enterprise 1.3".

Happy viewing! :)

In general, the LCD provides a lot of opportunities.

Here are a few "films" that we did not even have time to describe on the course page.

If you need to collect data from different sources, There are three options.

You can try to make one "universal" query for all data (long), you can display multiple request data in the cycle (rigid, inflexible structure) - and you can simply use CCD and connection of data sets Instead of one request.

At the same time, it is important to obtain the correct results - there are features in this if the sources are somewhat

With the help of the CE, you can simply get a cut of the last on each date in the report.

Or, for clarity, - get the price of goods for each date of sale.

Using the LCD can be organized conclusion to the report of all dates for the periodand not just those on which there were data in the report (addition date without programming, only the capabilities of the CCD)

With the help of the CCD, you can organize nested groups with the period addition of periods (year / quarter / month, etc.)

Arbitrarily to issue a report, for example, to output the column title vertically, and the data in this column is horizontally.

To give the user to choose the frequency with which the data will be displayed in the report (by year, by the quarters, by months) - exclusively by settings, without editing the report module.

How in the report to connect several conditions by or? Such a possibility, for example, in the report builder is not - but there is in the CCD

If you display summary data in the form of a chart, you need to be able to accurately control the external look: the visibility of markers for the series, alternating colors of the series of graphics, to separate the last data from future vertical line on the graph of the vertical line.

Of course, there are nuances for which you need to pay attention

When creating a report, the developer has debugged the text of the query, but when using this request in the report on the LCD, the system issues an incorrect result.

Therefore, it is important to be able to get a request that actually performs the system to receive data from the database, and debug such a request.

When adding to the detail report to the document-recorder, the system sometimes issues "incorrect" initial and final remnants.

Therefore, it is important to correctly configure the fields in the SCD report so that the remnants are displayed correctly and with the detail to the document, and without it.

The result of the report may change depending on where the selection is configured by the resource value - at the report level and at the individual group level, you need to monitor.

If you want to professionally masterk And daily apply in their work, sign up for the course:

Support - 2 months. Course volume - 34 school hours.

Do not postpone your studies!