The question of the need to print a large number of documents in 1C has been raised more than once, and on the Internet you can find a considerable number of treatments devoted to solving this problem. This question recently arose in front of me in the following formulation: “I need processing that allows me to print many invoices, the printing form is “TORG-12 (form 2011)” (we have such an external printing form - author’s note)” .

Without further ado, I take that same external printed form as a basis, hang all sorts of nice things on the dialog box for selecting invoices, correct the code and, voila - everything is ready! Further - more: “And I also need to print these invoices en masse, but in the printed form “TORG-12 (Prom)” (we also have such an external printed form - author’s note). Here it was already necessary to do something more universal in case, after some time, either new documents or new printed forms were needed again.

I found the following solution: classes! The bottom line: we wrap each external printed form in a class and call it from processing bulk document printing. The modifications to the external printed form for the class are quite small and take less time than their description in this article. The following needs to be improved:

  • - declare the “Document” variable and the “Print()” procedure export;
  • - we decisively delete the “On Opening()” procedure;
  • - copy the source table from the processing to the “.mxl” file (since the class will not see it inside the processing, that’s why it is a class) and, accordingly, replace the expression like “Table.SourceTable(“Table”);” to an expression like “Table.SourceTable(glCatalogPechForm + “Torg12.mxl”);”;
  • - to get one footcloth with a bunch of documents, and not a bunch of footcloths for one document, remove the declaration like “Table = CreateObject(“Table”);” and “Table.InitialTable(glCatalogPechForm + “Torg12.mxl”);” from the “Print()” procedure and insert it into the processing module (add it to the end of the module). Accordingly, we declare the “Table” variable as a module variable;
  • - we also remove an expression like “Table.Display()” from the “Print()” procedure; instead, add an export procedure “Display()” with a single line: “Table.Display();”. We will call this method after the loop with the “Print();” method.
  • - in order to new document published on new page, at the end of the “Print()” procedure, add a line like “Table.NewPage()”;
  • - check the module for the presence of lines like “Table.RepeatWhenPrintingLines();”. Otherwise there will be a surprise!
  • - and of course, provide for loading the external component 1срр.dll (if you don’t already have it) and describe the classes in defcls.prm.

As a result we have:

  1. The processing is universal - it can be implemented in any configuration.
  2. Using the example given in this processing, you can print any document in any internal or external printing form. When a new printing form is released, it is simply added to processing.
  3. The processing code has become extremely concise and understandable (and contains about a hundred lines). To add a new document, you only need to add a few lines of code to the end of the module by copy-pasting. To add a new printable to an existing document, you only need to add one line of code.
  4. For those uninitiated in OOP, this is a great example of what classes are and how to use them in practice.

If the printing procedure is located in the document form module, then the operating logic is the same: we copy the “Print()” procedure and wrap it in a class. True, there will be more improvements here: you will need to add a link to the document (i.e., what is transmitted by the context to an external printed form).

Disadvantages: I have already written about lines of code like “Table.RepeatWhenPrintingLines();”, with the help of which the title of the tabular part of the document is displayed on the next page. Since the vast majority of my documents fit on one page, I commented out these lines and removed headers and footers from the printed forms. If anyone needs to output these lines, the processing will need to be modified. But this is a flaw in the specific implementation, not the idea itself.

As a rule, a user of the 1C: Enterprise 7.7 program can independently update his working configuration. The following provides recommendations for updating a typical unmodified configuration. If your configuration has been changed, modifications have been made to documents, reports, or printed forms, then it is not recommended to update the configuration yourself. We recommend calling a qualified technician to carry out the update work.

How to independently connect external reports and external printed forms to the configuration in the 1C:Enterprise 7.7 program

Copying an external report to the infobase directory.

The external report file has the extension "ert". This is a direct external report. Typically, an external report file is accompanied by a description file with the extension "efd". This file is necessary so that the program immediately “finds” the report and does not need to connect it manually. For example, the external report file is called “Application Log.ert”, then the description file will be called “Application Log.efd”. These two files (or one if there is no file with the efd extension) must be copied to the working database directory. To do this, you first need to find the working database directory. After this, you need to find the "ExtForms" directory in the working database directory.
If you are copying an external printed form, you need to find the “PrnForms” directory in the “ExtForms” directory. You need to copy both files to the found directory (ExtForms for external reports and PrnForms for external printed forms).

Connecting to an external report program using special processing.

To connect to an external report database, you must open the report " Additional features", going to the menu "Tools" - "Additional features".

If you copied the external report and the file with the efd extension correctly, your external report will appear in the list of external reports.

If the efd configuration file is not copied, then you need to do the following:
Click the "Change" button and select "Add to list" from the menu.

From the drop-down list, select the desired external report file (which was copied to the ExtForms directory). If the required file is not in the list, this may be for two reasons: 1) The file was copied to the wrong folder, i.e. you need to carefully check again that the copying was correct in the chapter “Copying an external report to a directory” information base" 2) The file was copied correctly and is already in the list of external reports. In this case, you need to carefully look through the list of external reports and find the new added report.
After selecting the file, a window will open in which you need to specify the name of the external report. Enter a custom name. Click the "OK" button.

After this, your external file will appear in the list of external files.

Connecting an external (additional) printing form to the program.

To connect an external printing form, you must select from the menu "Tools" - "Registration of external printing forms".

Next, select for which document, or for which element or list of the directory you need to connect an external printed form. For example, let's connect an external printed form for the document "Shipment of goods, products". To do this, you need to select the “Document” item in the “External printed forms for” group. Next, select “Shipment of goods, products” from the menu.

The connected external printed forms should appear in the table. If the table contains the form you need, then it was connected automatically.
If the required form is not in the table, you must do the following: Click on the “Change…” button and select “Add to list” in the drop-down menu.

In the list that opens, you must select the form that you copied to the PrnForms directory.

If the form is not in the list, it means you copied the form incorrectly to the directory, carefully read the chapter “Copying an external report to the infobase directory” again.


To check the functionality of a new external printing form, you need to open the document, list or directory element to which you connected the form and click on the button with a small triangle located next to the “Print” button.

You must select a new printing form from the drop-down list.

In documents for which printing of any printed forms is provided, to the left of the button Seal There is a list button.

After clicking on this button, the user is presented with a list of printable forms to choose from. The first form in the list is standard, the remaining forms are registered as external.

Treatment Registering external printing forms designed for connecting new external printing forms. Connected forms are offered in the list of document printable forms.

The processing dialog box contains a table with a list of external printables. For each type of document, list or directory element, any number of external printed forms can be assigned.

In Group External printing forms for a document or directory for which a printed form is connected is specified. The group includes three switches:

  • Documenta- the printable form will appear in the print list of the dialog box of the document selected below;
  • Directory list- the printed form will appear in the print list of the directory selected below;
  • Directory element- the printable form will appear in the print list of the dialog box of the element of the reference book selected below.

All external printables are stored in a subdirectory PrnForms catalog EXTFORMS. When processing starts, the program reads external forms stored in this directory. Each row of the table contains a text title external file, the file name and the name of the button that will be assigned in the document (directory) to call the printing form.

Below the list there are buttons for working with external files.

Button Open opens the selected external file. This opens processing Seal, which requires you to specify a specific document (or reference book) that needs to be printed using an external form.

Pressing a button Update refills the list of external printing forms. The button must be used after recording new external printables in the subdirectory PrnForms.

Button Change used to work with a list of external files. When the button is pressed Change A menu of four items opens next to it:

  • Change the name;
  • Change button;
  • Add to list;
  • Remove from list.

When selecting an item Change name the text name of the external file will be displayed for editing in a separate dialog box.

After editing, the new name of the external file will appear in the list instead of the previous one.

When selecting an item Edit button the text name of the button will be displayed for editing in the same dialog box. After editing, the new button name will also appear in the list.

Paragraph Add to list allows you to add a new external form to the list. When you select this item, a list of files will open external forms located in the subdirectory PrnForms catalog EXTFORMS. Information about the file name and button name is stored in text file with extension efd. These names are automatically included in the list. They can be changed if necessary.

Paragraph Remove from list after an additional request, removes the line describing the external file from the list. In this case, the file itself is not deleted, so it can later be added to the list again.