How to connect an external report in 1s 8.3. Adding an external report to the database. Connection of external printing form and processing

In this article, we will consider step-by-step instructions for creating external processing in 1C 8.3 in managed application mode; accordingly, we will use managed forms. And most importantly, we will learn how to connect it to the mechanism of “external processing” of 1C configurations built on a library of standard subsystems version 2.0 and newer.

The task will be the following: to create the simplest external processing that will perform a group action on the “Item” directory, namely, set the selected VAT rate percentage for the specified group of items.

To do this, we will immediately make the necessary settings in the program (we are considering the 1C 8.3 configuration: “Enterprise Accounting 3.0” on managed forms).

Checking this box gives us the opportunity to use external processing.

Creating a new external processing in 1C 8.3 using an example

Now let's go to the configurator. In the "File" menu, select "New...". A window for selecting the type of file to be created will open. Select “External processing”:

A new external processing window will open. Let's give her a name right away. It will be offered when saving the processing to disk:

Let's add a new controlled processing form. We indicate that this is a form of processing and it is the main one:

We will have two details on the form:

  • Nomenclature group – link to the “Nomenclature” directory;
  • SelectVATRate – link to the transfer of the VAT Rate.

We create the details in the “Properties” column in the upper right window. Drag them with the mouse into the upper left window. The new details should immediately appear on the form below.

The order of details can be changed using the “Up” – “Down” arrows:

Get 267 video lessons on 1C for free:

All that remains is to add the “Install” button. In managed forms, you can't just add a button to the form. Even if you add it to the structure of form elements, it will not be visible on the form itself. The button must be associated with the command that it will execute. Go to the “Commands” tab and add the “Set VAT Rate” command. In the command properties, create an action. Select the command handler “On the client”. A command can also be added to the form by simply dragging it into the section with form elements.

A procedure of the same name will be created in the form module. In it we will call the procedure on the server:

&OnClient

Procedure Set VAT Rate (Command)

SetVATRateOnServer();

End of Procedure

In the procedure on the server, we will write a small request and actions related to setting the VAT rate:

&On server

Procedure SetVATRateOnServer()

Request = New Request;
Request.Text =
"CHOOSE
| Nomenclature.Link
|FROM
| Directory.Nomenclature AS Nomenclature
|WHERE
| Nomenclature.Link IN HIERARCHY (&Nomenclature Group)
| AND NOT Nomenclature.MarkDeletion
| AND NOT Nomenclature. This is a Group”;

Request.SetParameter("Item Group", Item Group);
ResRequest = Request.Execute();
SelectRecordDet = ResRequest.Select();

While SelectRecordDet.Next() Loop

Attempt
SprNomObject.Write();
Exception
Report("Error writing object """ + SprNomObject + """!
|» + DescriptionError());
EndAttempt;

EndCycle;

End of Procedure

We return to the “Form” tab, add a button to the form and associate it with the command:

As such, our processing is ready for use. To call it, in the “1C Enterprise” mode, you need to go to the “File” - “Open” menu and select the created file.

However, working in this mode is convenient for debugging processing, but is not entirely suitable for the user. Users are accustomed to having everything “at their fingertips,” that is, in the database itself.

This is what the “Additional reports and processing” section is for.

But in order to add our processing there, we must first give it a description and tell the program its properties.

Description of the function “Information about External Processing”

I will give an example of the contents of this function. It must be exportable and, accordingly, located in the processing module:

Function InformationOnExternalProcessing() Export

DataForReg = New Structure();
DataForReg.Insert("Name", "VAT rate setting");
DataForReg.Insert("SafeMode", True);
DataForReg.Insert("Version", "ver.: 1.001");
DataForReg.Insert("Information", "Processing for setting the VAT rate in the Nomenclature directory");
DataForReg.Insert("View", "AdditionalProcessing");

CommandTable = NewValueTable;
TabZnCommands.Columns.Add("Identifier");
TabZnCommands.Columns.Add("Usage");
TabZnCommands.Columns.Add("View");

NewRow = TabZnCommands.Add();
NewString.Identifier = "OpenProcessing";
NewRow.Use = "OpenForm";
NewRow.View = "Open processing";
DataForReg.Insert("Commands", TabZnCommands);

Return DataForReg;

EndFunction

To better understand which fields of the registration data structure need to be used, let’s look at the details of the “Additional reports and processing” directory:

As you can see, everything is quite simple. Only one attribute does not match: “Launch Option” – “Use”. If we look at the code of one of the common modules, we will see how a bunch of these fields arise:

To determine which fields of a structure are required, you can first not describe it, simply create an empty one, and then use the debugger. If you trace modules when registering processing, it becomes immediately clear which fields are required and which are not.

Connecting external processing in 1C 8.3

External processing is a very convenient tool for companies using standard configurations on 1C:Enterprise 8.3. They allow you not to waste effort and money on 1C updates, making it possible to update databases with one button in simple user mode. Using the standard subsystem library mechanism, you can add various buttons to documents and reference books without changing the standard configuration. Let's consider an example of creating and connecting external processing in one of the 1C configurations.

We create external processing in 1C 8.3

To create a new external processing, we use the configurator. Through the “File” menu, select the creation command “New...” and determine that we will create external processing. In the window that opens, set the name, and when you press “Enter,” it is filled in automatically. The system will also offer you this name as the file name when saving.

Let's add a processing form by clicking on the button with a magnifying glass in the corresponding window. For example, let's create a processing showing which customer orders use a certain item. To do this, we need to place on the form:

  • Attributes – field for setting the nomenclature;
  • A button that will call the code.

Add the “Nomenclature” attribute with the data type “DirectoryLink.Nomenclature” in the corresponding section and the “Show” button in the “Commands” -> “Form Commands” menu.

In order for the added data to be reflected on the form, you must drag it into the form elements located in the upper left part. It is possible to swap elements using the blue arrows. In order for the button we created to do what it intended, it needs to be assigned a procedure. Through the context menu, select “Command Action”, and when asked where the handler is needed, we will answer: “Create on the client and a procedure on the server.”


Fragment 1

&OnClient Procedure Show(Command) ShowOnServer(); End of Procedure &OnServer Procedure ShowOnServer() //Insert the contents of the handler. End of Procedure

We chose to create a procedure on the server because we want to receive a sample from the database as a result. We do not have this option on the client, so we will need to connect to the server, which exchanges data with the database. Now we need to write code that implements what we have planned. The request and output of all documents through the “Report()” function will be used.


Fragment 2

&OnClient Procedure Show(Command) ShowOnServer(Nomenclature); EndProcedure &OnServer Procedure ShowOnServer(Nomenclature) Request = New Request; Query.Text = "SELECT VARIOUS | Customer OrderComposition.Link AS Link | FROM | Document.Customer Order.Composition AS Customer OrderComposition | WHERE | Customer OrderComposition.Nomenclature = &Nomenclature"; Request.SetParameter("Nomenclature", Nomenclature); RequestResult = Request.Execute(); SelectionDetailRecords = QueryResult.Select(); While SelectionDetailedRecords.Next() Loop Report(SelectionDetailedRecords.Link); EndCycle; End of Procedure

At the current stage, we can open external processing in a running 1C database as an ordinary file, and it will already be operational. But if we have many users, we will have to send this file to them all, providing them with instructions on how to actually open it in 1C, which is extremely inconvenient. To avoid this, our processing should be located inside one of the 1C sections. To do this, we need to modify it a little more through the configurator, specifying certain settings.

To place external processing in section 1C, it is necessary to register the procedure “Information ABOUT External Processing” in the object module. From the main processing menu, click Actions and select Object Module. Here you need to register all the settings necessary for 1C so that the system understands what is required of it and what kind of file is in front of it. The screenshot shows the code for the “Information ABOUT External Processing” function.

Function InformationOnExternalProcessing() Export DataForReg = New Structure(); DataForReg.Insert("Name","New external processing"); DataForReg.Insert("SafeMode", True); DataForReg.Insert("Version", "ver.: 1.001"); DataForReg.Insert("View", "AdditionalProcessing"); CommandTable = NewValueTable; TabZnCommands.Columns.Add("Identifier"); TabZnCommands.Columns.Add("Usage"); TabZnCommands.Columns.Add("View"); NewRow = TabZnCommands.Add(); NewString.Identifier = "NewExternalProcessing"; NewRow.Use = "OpenForm"; NewRow.View = "New external processing"; DataForReg.Insert("Commands", TabZnCommands); Return DataForReg; EndFunction

Fragment 3

Connecting external processing in 1C

Before connecting external processing to a standard configuration, you must enable the use of this tool. In “Administration”, in the sub-item “Printed forms, reports and processing”, set the flag opposite the mechanism we need. A button for going to the directory of additional processing and reports becomes available to us.


When we go to the list, we will create a new line in it, and the system will prompt you to select a file. We select the processing we made and saved, and the 1C configuration independently fills in most of the fields. Using the “Run” button, we can already check the functionality of our processing, but this is not very convenient for other users. In order for users to have our command and be able to make a call, we need to:

  • Specify the location of the object. By clicking on “Undefined” we open the sections window and indicate in which sections the operation will be available;
  • Select users for whom this command will appear in the “Additional processing” menu of the selected sections without unnecessary settings. To do this, in the tabular section you need to select the “Quick Access” item and add responsible users to the right half;
  • On the “Additional Information” tab, you can specify the folder in which the downloaded processing will be located;
  • After pressing the “Write” button in the selected section in the “Additional Processing” menu, users will find our command and will be able to use it.

If we want to make changes to our processing, we must first unload it from the database. To do this, find the required line in the “Additional processing and reports” directory and use the “Upload to file...” command. Make changes, save the processing and use the “Load from file...” button to find the modified epf file without changing the parameters. After recording, all users will see the changes made.

If you are using a non-standard or discontinued 1C database, then take advantage of the opportunity to download processing through the configurator. In the object tree, in the “Processings” section, create a new processing and, through the context menu, select “Replace with external processing, report...”. All that remains is to configure the launch of external processing from the desired section, including the added processing in the desired subsystem.


Working with external processing is very convenient and allows you to avoid many conflicts. Their only significant drawback is that they are not updated automatically along with the configuration. That is, if the developers changed the name of the document or reference book in the main configuration, we will have to manually configure the processing.

You can connect an external report in the directory Regulated reports. The directory is available in the section Reports - Regulated reports, button Directory of reports.

In the directory, select the report that needs to be replaced. Right-click to select a command Change(or with the button F2).

In the card that opens, select the option to use the file. The line indicates the path to the external report that needs to be connected.


The changes made must be saved. The external report is connected and can be used.

Connection of external printing form and processing

To connect an external printing plate, processing, in the section Administration - Printed forms, reports and processing you need to follow the hyperlink Additional reports and processing.


In the window that opens, you need to create a new element using the button Create.

Important!

If there is already a predefined element for the external processing to be connected, a new element is not created. Processing is connected by changing an existing record (similar to connecting an external regulated report).



When you press the button, the program will display a security warning message. To continue working on setting up the connection of an external file, you must click the button Continue.


After confirming the security message, the program automatically redirects the user to selecting an external form file for processing.


The user needs to select a file that will be connected as an external form or processing, after which the program will check whether the file corresponds to the configuration release number.

If there is a discrepancy, the program will display a message.


For more information about obtaining information about the configuration release version, see the response from the consultation line "".

If the file matches the program version, it will be successfully loaded by the program and connected.

In this article we will look at how to connect external processing or reporting to your 1C. As an example, we use the configuration “Enterprise Accounting ed. 3.0", but the article is also suitable for any other modern 1C.

Processing connection

  1. If the processing came to you by mail, first save it to your computer;
  2. Go to the menu “Administration” - “Print forms, reports and processing”:
“Administration” - “Printed forms, reports and processing”

3. Check the “Additional reports and processing” checkbox if it is not already selected:


"Additional reports and processing" checkbox

If you do not have this checkbox, it means you do not have enough rights in 1C. If 1C is installed on your server, then contact your 1C administrator so that he can enable processing for you. If he has never done this before, give him a link to this article.

Also, this checkbox may not be present if your 1c is in a cloud service. In this case, simply send the processing file to your manager. If they refuse to connect processing to your cloud, we can

4. Go to “Additional reports and processing”:


5. In the list that opens, click “Create”:


Adding External Processing

6. 1C will display a security warning, click “Continue”:


7. A window for selecting a processing file will open. Select the desired file and click "Open":


Selecting a processing file

If the message “It is not possible to connect additional processing from the file. Perhaps it is not suitable for this version of the program,” which means either you downloaded the processing not for your version of 1C, or the developer formatted the processing code incorrectly, or there is an error in the program code itself:


Contact the processing developer, or contact us, we

8. If the file matches your version of the program, a form for creating a new external processing will open. It will immediately contain the name of the processing specified by the developer and the name of the command that opens the processing:


You need to fill out the location of the processing and determine the list of users to whom it will be immediately available.

9. Click on “Undefined”:


10. In the form that opens, select one or more sections from which you want to open processing:


11. Now specify those users who need access to processing:


12. Use the “>” button to select the required users. If everyone needs access, then click “>>”:


13. At this point the settings are completed, all that remains is to save the processing. Click "Save and Close":


Checking connected processing

14. Now go to the section in which you placed the new processing. The “Additional processing” link should appear in it:


15. Click on it, there will be a newly connected processing. By selecting it with the mouse and clicking “Run” you will start processing:


Connecting a report

An external report is connected in the same way as external processing.

The only difference: the report will appear in the “Additional reports” section:


Running an external report is the same as for external processing:


That's all, now you know how to connect external processing or reporting to 1C

Very often, 1C users require additional functionality that is not contained in a standard application solution. This could be a special printed form of a document, a report containing the necessary data, filling out directories and documents according to a certain algorithm, entering some objects based on others, etc. To perform these and many other actions, you do not need to remove the configuration from support and lose automatic updates; standard application solutions allow you to solve such problems using external reports and processing. In addition, external processing can be launched in basic versions, which do not require changes to the configuration of the application solution.

Any application solution (even an empty one that does not contain objects) built on the basis of 1C:Enterprise allows the use of external reports and processing. This is done through the main menu: “File” - “Open”. After selecting an external report file or processing, its form opens and the user can use the required functionality.

The peculiarity of standard application solutions is that they have built-in special subsystems that expand the possibilities of using external reports and processing.

Based on the type of launch, application solutions are divided into two groups: built on the basis of a regular or managed application. The first group includes “Accounting 2.x”, “Trade Management 10.x”, “Retail 1.x”, etc. The second group includes “Accounting 3.x”, “Trade Management 11.x”, “Retail 2.x”, “Management of our company”, etc. Application solutions built on top of a regular application are outdated, but are still widely used by users.

In this article we will consider the use of external reports and processing in a regular interface using the example of a typical application solution “1C: Trade Management 10.3”.

In the normal interface, external reports and processing are connected through the main menu “Service” - “External printed forms and processing”.

The system allows the use of external reports and processing of four types:

  1. External reports

External printed forms - generates printed forms of reference books and documents that are not provided in the standard application solution.


When you add or edit an additional printing form, the external processing card opens.


In the card you must indicate the name of the printing form, a comment and select an external processing file. If external processing has auto-registration parameters, the “Print Form Ownership” table will be filled in automatically. But if necessary, it can be filled out or edited manually.

  • Object representation - an object to which an external printed form (directory or document) is attached. When you press the selection button, a form for selecting a printing plate accessory opens.

  • Selection - allows you to connect an external printing form not for all documents, but for certain ones by selection. Moreover, the selection is configured for each belonging object separately. Selection is configured similarly to standard selections in reports and processing.


  • Printable form file - allows you to select a separate external printing form file for each accessory object, i.e. these may be completely different in the implementation of processing, but identical in meaning.
  • Replaceable printing form - allows you to select a standard printing form of the object, which will be replaced by a new external printing form. This is necessary so that users do not get confused in cases where a new external one is developed instead of a standard form.
  • Processing parameters are additional parameters passed to the print function. Practically not relevant for external printing forms. Parameters can only accept values ​​of simple types (number, string, date, boolean).


After connecting an additional printing form, it will be available in the specified document or reference book in the “Print” menu.

In our example, for the document “Invoice for payment to the buyer,” an external printed form replaces the standard one with selection by counterparty.


For the document “Sales of goods and services”:


External processing of filling tabular parts

External processing for filling out tabular parts - allows you to fill out tabular parts of reference books and documents using specified algorithms.

When adding or editing processing to fill out tabular parts, an external processing card opens. It is different from an external printed form card.


In the card, you must indicate the name of the processing for filling out the tabular parts, a comment, and select an external processing file. If external processing has auto-registration parameters, the “Print Form Ownership” table will be filled in automatically. But if necessary, it can be filled out or edited manually.

The table contains the following columns:

  • Object representation - an object to which external processing of filling tabular parts (directory or document) is attached. When you click the selection button, a form for selecting accessories for processing filling out tabular parts opens.
  • Tabular part - the tabular part to which processing is assigned.
  • Button view - the name of the button that will trigger the processing of filling the table parts.
  • Processing parameters are additional parameters passed to the print function. Parameters can only accept values ​​of simple types (number, string, date, boolean).

After connecting external processing for filling tabular parts, it will be available in the specified document or reference book in the “Fill” menu of the selected tabular part.

In our example, the “Fill in balances” button is added to the “Goods” tabular section of the “Goods receipt order” document.


External processing - process data using an arbitrary algorithm.


When adding or editing an external processing, its card opens.


In the card you must indicate the name of the processing, a comment and select an external processing file. The “Affiliation” tabular part is not active for external processing.

After connecting an external processor, it will be available in the list of external processors and can be opened by double-clicking.

External reports

External reports - display data that is not provided for in a typical application solution.


In the card you must specify the name of the report, a comment and select an external report file. The “Affiliation” tabular part for the external report is not active.

After connecting an external report, it will be available in the list of external reports and can be opened by double-clicking.

As we can see, the use of external processing in a regular interface expands the capabilities of a standard application solution and simplifies the user experience.

In the next article we will look at a managed interface, which gives even more opportunities for using external reports and processing.

Share with friends or save for yourself:

Loading...