Registration of external printed forms in 1C 7.7. Connect to the external report program using special processing

The question of the need to print in 1C of a large number of documents raised more than once, and the network you can find a considerable number of treatments devoted to solving this problem. This question did not get up so long ago in front of me in the following statement: "I need a processing that allows you to print a lot of invoices, printed form -" TORG-12 (2011 shape) "(we have such an external printed form - approx. Author)" .

Without caustic, I take the most external printed form as the basis, I hang on the dialog box all sorts of beautifulness to select the invoices, correct the code and, voila - everything is ready! Next - more: "And I still need to print these overheads massively, but in the print form" TORG-12 (PROM) "(we have such an external printed form - approx. Author). Here it was already necessary to do something more universal in case, after some time, it will be needed again or new documents, or new printed forms.

I found the following: classes! Essence: I turn into a class every external printed form and call it from the processing of mass printing documents. The improvement of the external printed form under the class is very small and occupy less time than their description in this article. And the following needs to be finalized:

  • - we declare the export variable "Dock" and the procedure "Printing ()";
  • - resolutely delete the "opening () procedure";
  • - The source table copy from the processing to the ".mxl" file (since the class does not see it inside the processing, then it is both class) and, accordingly, replace the expression of the type "Table. Tabletlack (" Table ");" to the expression of the type "Table. TableThe order (Galkalogpechechform +" Torg12.mxl ");";
  • - To get one port with a bunch of documents, and not a bunch of portions one document, we remove the type of "Table \u003d Create a job (" Table ");" and "Table. TableThe order (Galkalogpechechform +" Torg12.mxl ");" From the procedure "Print ()" and insert it into the processing module (add to the end of the module). Accordingly, the variable "Table" is declared a variable module;
  • - Also remove the "Table" type expression from the procedure "Print ()", instead add the export procedure "Show ()" with a single line: "Table. Sink ();". This method will be called after a cycle with the "Printing () method;
  • - In order for the new document to be printed on a new page, at the end of the Print () procedure, add a "table.New ()" type string;
  • - Check the module for the presence of rows of the type "Table. Refractory expirates ();". Otherwise there will be a surprise!
  • - Well, naturally, it is possible to provide for the external component of 1Sr.DLL (if it is still not provided for you) and describe the classes in defcls.prm.

As a result, we have:

  1. Processing is universal - it can be implemented in any configuration.
  2. Using the example given in this processing, any document in any internal or external printed form can be printed. When entering the light of a new printed form, it is elementary added to the processing.
  3. The processing code has become brief and understandable to the limit (and contains hundreds of strings). To add a new document, add only a few lines of code to the end of the module by copy paste. To add a new printed form to an existing document, you need to add only one code line.
  4. For the uninitiated OOP, this is an excellent example of what classes are and how to apply them in practice.

If the printing procedure is in the document form module, then the logic of the work is the same: the procedure "print ()" copy and turn into a class. True, here the improvements will be more: it will be necessary to add a reference to the document (that is, what is transmitted by the context into an external printed form).

Disadvantages: I have already written about the rows of the type of type "Table. Exparing printers ();", with which it is displayed to the next page title table part of the document. Since I have an overwhelming majority of documents on one page, I compmented these lines and removed the footers from the printed forms. If someone needs to withdraw these lines - the processing will need to be finalized. But this is a lack of concrete implementation, and not the idea itself.

As a rule, the user of the program 1C: Enterprise 7.7 can independently update its working configuration. The following are recommendations for updating a typical unchanged configuration. If your configuration is changed, completed in documents, reports, or printed forms, it is not recommended to update the configuration yourself. We recommend calling a qualified specialist for updating work.

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

Copying an external report to the information base directory.

The external report file has an extension "ERT". This is directly an external report. Usually, an external report file is attached to the "EFD" extension file. This file is necessary in order for the program to immediately "found" the report and it is not necessary to connect it manually. For example, an external report file is called "Job Allowers", then the description file will be called "jubbeta response .efd". These two files (or one, if there is no file with the EFD extension) you must copy to the working database directory. To do this, you first need to find the working database directory. After that, you need to find the "ExtForms" directory in the working database directory.
If you copy an external printed form, then you must find in the "ExtForms" directory "PRNForms" directory. In the found directory (extForms for external reports and PRNForms for external printed forms) you need to copy both files.

Connecting to an external report program using special processing.

To connect to the external report database, you must open the "Additional Features" report by clicking on the "Service" menu - "Additional Features".

If you copied the correctly external report and file with the EFD extension, then 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:
Press the "Change" button Select from the "Make List" menu.

From the drop-down list, select the desired external report file (which was copied to the ExtForms directory). If it did not turn out to be in the list of the desired file, it may be for two reasons: 1) The file was copied not in that folder, i.e., you need to carefully check out the correctness of copying the "Copy of an external report to the information base directory." 2) The file is copied correctly and already in the list of external reports. In this case, you need to carefully view the list of external reports and find a new added report.
After selecting the file, the window will open in which you need to specify the name of the external report. Enter an arbitrary name. Click the "OK" Knock.

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

Connect to the program of external (optional) printed form.

To connect an external printed form, you must select from the "SERVICE" menu - "Register external printed forms".

Next, select for which document, or for which element or list of the reference book you need to connect an external printed form. For example, connect the external printed form for the document "Shipping of goods, products". To do this, you must put in the "External Printing Forms for" a switch to the "Document". Next, select from the menu "Shipping goods, products".

The table must appear connected external printed forms. If there is a form that you need, then it has been connected automatically.
If there is no desired form in the table, you need to do the following: click on the "Edit ..." button and select "Make List" in the drop-down menu.

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

If there are no forms in the list, then you incorrectly copied the form to the directory once again read the chapter "Copying an external report to the information base catalog."


To check the performance of a new external printed form, you need to open a document, a list or element of the reference book to which you connected the shape and click on the button with a small triangle located next to the "Print" button.

In the drop-down list, you must select a new print form.

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

After clicking on this button, the user offers a list of printed forms to select. The first form in the list is standard, the remaining forms are registered as external.

Treatment Registration of external printed forms Designed to connect new external printed forms. Connected forms are offered in the list of printed form of the document.

The processing dialog box contains a table with a list of external printed forms. For each type of document, the list or element of the reference book can be assigned an arbitrarily many external printed forms.

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

  • Document - the printed form will appear in the print list of the dialog box of the document selected below;
  • List of reference book - the printed form will appear in the print list selected below the reference book;
  • Element of reference book - The printed form will appear in the print list of the element of the selected reference book.

All external printed forms are stored in subdirectory Prnforms. Catalog Extforms.. When processing is started, the program reads external forms stored in this directory. Each line of the table contains the text name of the external file, the file name and the button name, which will be assigned in the document (directory) to call the printed form.

Under the list are the buttons to work with external files.

Button Open Opens the selected external file. It opens processing PrintIn which you want to specify a specific document (or directory), which must be printed using an external form.

Pressing the button Refresh Really fills the list of external printed forms. The button must be used after recording new external printed forms in subdirectory Prnforms..

Button Change Used to work with the list of external files. When pressing the button Change The menu of four points opens next to it:

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

When choosing item Change title The text name of the external file will be issued 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 choosing item Change button The text name of the button will be issued for editing in the same dialog box. After editing, the new button name will also appear in the list.

Paragraph Add to the list Allows you to add a new external form to the list. If this item is selected, the list of external form files will be opened in subdirectory Prnforms. Catalog Extforms.. Information about the name of the file and the name of the button is stored in a text file with expansion eFD.. These names are automatically included in the list. If necessary, they can be changed.

Paragraph Remove from the list After an additional query, removes the string from the list describing the external file. At the same time, the file itself is not deleted, so it can be subsequently added to the list.


Top.