Make external printable 8.3

15.07.2023

This article will describe in detail how a beginner who does not know 1C 8 well to create a printable. For example, let's take one of the most common 1C 8 configurations - Accounting 2.0. Creating a printable 1C stages of writing:

  • Creating an external printable file;
  • Creation of a printed form layout;
  • Writing a program code for displaying printed form data on the screen;
  • Creation of parameters for auto-registration of a printed form;
  • Connecting an external printing form to the base 1C Enterprises.

Creation of a printed form 1C. Formulation of the problem

We are required in the configuration Accounting 2.0 create a printable for a document Receipt of goods and services. In the header of the printed form, display the following data:

  • Organization;
  • Counterparty;
  • counterparty agreement;
  • Date of receipt.

Display table data in tabular form Goods document. The table should include the following columns:

  • Nomenclature;
  • Quantity;
  • Price;
  • Sum;
  • As well as the price of the item for the current date (by type of prices from the document).

External processing file

Let's move on to solving the problem. To get started, open 1C 8 in mode Configurator. It is in this mode that all developments are carried out on the 1C 8 platform. Now we need to create an external processing file. To do this, click on the menu File -> New... or by the icon of the new file.

In the window that opens, select the item External processing.

Further into the field Name you must enter the name of the external processing. In our case, let's call it simply: "Printing Form", the synonym field will be filled in automatically. Please note that in the field Name, external processing, the name should be written without spaces and punctuation marks.

Add an external processing attribute ObjectReference and select for him type DocumentReference.Receipt of GoodsServices. To do this, in the metadata tree of external processing 1C, select the item Requisites and press the button Add(green plus button). In the right part of the screen, the attribute properties window will open, in the field Name write - LinkToObject. IN field Type press the button with three dots.

Expand the branch in the type tree DocumentLink, and find the item Receipt of Goods and Services there, check the box next to it and click OK.

Let's save the external processing file to the hard drive, for this we will use the menu File -> Save, icon Save(blue floppy disk) or a keyboard shortcut ctrl+s. Let's name the saved file "PrintForm".

Create a printable layout

Let's start creating a 1C printable layout. The layout serves as a template for the output of the printable, so if you want your printable to look good, you should pay attention to it.

Let's add a new layout in the external processing metadata tree, we won't change anything in the layout designer window and press the button Ready.

In the new layout that opens, let's create several areas needed to display the printed form. All the layout areas we need will be horizontal, so to create a new area, select the required number of layout lines and go to the menu Table -> Names -> Assign Name or use keyboard shortcut Ctrl+Shift+N then enter the name of the region in the box. When creating a layout area, do not be afraid to make a mistake with the number of lines; you can always add or remove them. To delete a 1C layout row, select the desired row and select the item in the context menu Delete. To add a new line to the layout, select any line of the layout and select the item in the context menu push apart.

Adding a Layout Header

Let's create an area first. A cap, it will display the data for the header of the printed form. For this area, we need seven layout lines. Select them and, as I wrote above, press the keyboard shortcut Ctrl+Shift+N, in field Name write "Hat" and press the button OK.

Let's fill the layout area with the data we need. Usually, no printed form is complete without a header, so we will create it in our layout header as well. Since in the header, in addition to the name of the printed form, we will also display the number of the document from which it was printed, we will set the text of the header in the layout as a parameter. A layout parameter is a specially designated layout cell into which various data can be displayed using the built-in 1C 8 language. The title should be displayed on the entire width of the printed form, so let's decide how many layout cells will be enough for us to print on the standard landscape orientation of the sheet.

Usually thirteen or fourteen layout cells are enough, select them in the first line of the area A cap and merge into one cell ( Context Menu -> Merge). After that, double-click on the resulting large cell and write the name of the parameter, in our case "HeaderText". In order for the entered text to become a full-fledged parameter, right-click on the cell and select the item in the context menu Properties. Bookmark Layout find a field filling and choose the value Parameter. The parameters in the 1C layout are indicated by brackets "<>».

The title of the printed form should stand out among other text, so once again select the cell and use the icons on the layout formatting panel to set the text alignment Centered and font size 14.

After the title text, we will display in the area A cap data on the organization, counterparty, counterparty agreement and the date of receipt of the goods. Since all this data is also taken from the document, we will also decorate them with parameters. In addition, before each parameter, you should write an explanatory text so that the user can easily understand where the organization is, and where the counterparty is, etc. All these actions are similar to creating a header, so I will not dwell on them in detail, I will only give a picture with what should turn out in the end.

The figure shows how the layout options differ from plain text.

Adding a Layout Table Header

The last thing we need to create in this layout area is the table header, in which the data of the tabular part will be displayed. Goods. The columns required for the table were described in the "Problem Statement" section. We will also create a table header using the merging of cells and writing text (column names). Select the borders of the table header using the tool Frame, which is located in the layout formatting bar.

Adding a table to a layout

Let's create another area in the layout - Data. It will display the data table of the tabular part Goods. We only need one layout line for this area. To display all the lines of the tabular part in a printed form, we will fill in and display this area the required number of times. Speakers in the area Data must match the columns of the table header, so filling it out will not be difficult. The only difference is in the area Data we need options, not just text. Also note that by default numeric parameters are formatted on the right margin and text parameters on the left. To select columns, you also need to use the tool Frame.

Adding a Footer to a Layout

The last area of ​​the layout we need is Basement. It will display totals by quantity and amount. Creation is similar to creation of an area Data, but in addition, the results should be highlighted in bold.

The result should be a layout that looks like this:

Creation of a printed form 1C. Programming

Let's start programming - this is the most important stage in creating a printed form. First of all, let's go to the module of the external printing plate object, this is where we will program. To do this, in the main window of external processing, press Actions -> Open object module.

In the external printing form object module, you need to create an export function Seal().

Function Print() Export EndFunction

Please note that this feature is required for external printables in configurations using a regular application. We will write all subsequent program code necessary to display the printed form inside this function.

Initializing Basic Variables

Let's create a variable TabDoc, which will contain a spreadsheet document - it is he who is the printed form into which we will display the filled areas of the layout.

TabDoc = new SpreadsheetDocument;

into a variable Layout we will receive the printed form layout created by us. To do this, we use the built-in function GetLayout(<ИмяМакета>).

Layout = GetLayout("Layout");

We will get all areas of the layout into variables. To do this, we use the layout method GetRegion(<ИмяОбласти>) .

Header Area = Layout. GetArea("Header"); AreaData = Layout.GetArea("Data"); AreaFooter = Layout.GetArea("Basement");

Displaying the printable header in a spreadsheet document

All necessary variables are initialized. Let's start filling and displaying layout areas in a spreadsheet document. First of all, let's fill in the title of the printed form, for this we need to pass in the parameter Title Text, which we created in the layout, the text we need. To fill in the parameter values, the layout area has a special collection, which is called - Options. From which through the "." you can get any parameter. In the title text we will pass the text: “Printing form”, as well as the document number.

Header Area.Parameters.HeaderText = "Printing Form"+ReferenceToObject.Number;

The remaining parameters of the header will be filled in a similar way, all the values ​​​​required for them will be obtained from the props ReferenceToObject, which contains a link to the document to be printed.

HeaderScope.Parameters.Organization = LinkToObject.Organization; Header area.Parameters.Account = LinkToObject.Account; Header Area.Parameters.IncomingDate = ObjectReference.Date; Header Area.Parameters.Counterparty Agreement = LinkToObject.Counterparty Agreement;

All header parameters are filled in, we will display it in the spreadsheet document we created, for this we use the method output(<Область>) .

TabDoc.Output(HeaderArea);

Writing a request for a printed handicap

Let's start filling and displaying the area Data. Creating a 1C printable also implies writing a query, we need it to get the data of the tabular part Goods and prices Nomenclatures for the current date we will use Request. The 1C 8 query language is similar to SQL, or rather, practically copies the capabilities of its SELECT statement, but the entire query is written in Russian. Therefore, if you are at least remotely familiar with SQL, then you will easily understand the 1C 8 query language.

In this printed form, the request will be quite simple and many will say that one could do without it, but knowledge of the query language and the ability to use it correctly is one of the main skills of a 1C programmer. Queries allow using fewer resources to obtain the most complex data selections, and it is also much easier to understand the text of the query than in the program code written without using the query (or with minimal use of it). In addition, 1C 8 has a very good query builder that allows you to interactively collect a query from the necessary tables.

Let's create a variable that will contain the request.

Request = New Request;

The text of the request will be composed using the query builder. Let's start by writing:

Request.Text = "";

Put the mouse cursor between the quotes, press the right mouse button. In the context menu that opens, select the item Request constructor, it will help us a lot in creating a 1C printable. After that, the query designer window will open, it contains many tabs, but our query will need only four: "Tables and Fields", "Relations", "Conditions", "Joins / Aliases".

For our query, we need two tables: the tabular part Goods document Receipt of goods and services and a slice of the latest information on the current date of the register Item prices.

In the left part of the designer window, find the column Database. It contains a tree of all metadata objects, let's find the ones we need. To do this, open the branch Documentation and find the document Incoming Goods Services, expand it and find the tabular part Goods, drag it to the column of the query designer tables. There are three ways to drag and drop: by dragging, by double-clicking on the table, or by selecting it and clicking the ">" button. Let's open a branch RegistersInformation and find a table there PricesItems.SliceLast, also drag it to the column tables. These two tables are enough for our query.

Let's select the fields we need from the resulting tables. To do this, in the column tables open the table and find the fields: Nomenclature, Amount, Price, Quantity and drag them to the third column of the constructor - fields. Let's open the table , find the field Price and also drag it to fields.

The structure of the tables and fields of our request is ready, now let's deal with the conditions. We need the data of the tabular part Goods were not taken from all receipts, but only from the one that we print. To do this, we impose a condition on the table Incoming Goods Services Goods. Let's go to the "Conditions" tab of the query builder. In a collumn fields the tables we selected earlier are located, for the condition we need the field Link from the table Receipt of Goods, Services, Goods, drag it to the Conditions window.

In 1C queries, you can use parameters, they are needed in order to transfer data to the query. For example, if we want to limit the selection of documents to a specific document, then we can use a parameter to pass a link to this document to the request and use this parameter in the condition. This is exactly what we will do in our request.

Once out the window Conditions we added a field Link, the query builder will create a parameter with the same name and place it after the "=" sign. This parameter can be renamed if desired. In the text of the request, the parameters are marked with the “&” sign, but in this case this is not necessary, since it is assumed that the parameter is in the second part of the condition, you just need to remember it. How to pass a value to a 1C request parameter will be discussed below.

Since in the query we use not the full price table of the item, but a virtual one (a slice of the latter in this case), we need to set the conditions for the formation of this virtual table, in our case this is the date of the cut and the condition for the type of prices (prices must be selected that have a strictly defined price type - the one that is specified in the receipt document that we print).

To fill in the parameters of the virtual table, go to the tab Tables and fields query constructor, in the column tables select a table PricesItemsSliceLatest and press the button Virtual Table Options located at the top. In the window that opens, in the field Period you should set the parameter to which the date for which the price cut will be made will be passed. In our case, this will be the current date (that is, today), so we will name the parameter "&CurrentDate". In the condition field, we will write the conditions for the price type, we will also pass it in the parameter, which we will call “&PriceType”. The resulting condition will look like this (where Price Type- register measurement Item prices):

PriceType = &PriceType

The parameters of the virtual table are filled, click the button OK.

Now that we have limited the selection to only the document we need, let's create relationships between the query tables. If this is not done, then the prices from the table PricesItemsSliceLast will not be associated with the item from the receipt. Let's go to the tab Connections query constructor. Let's create a link by field Nomenclature between our two tables. To do this, press the button Add, in field Table 1 choose a table Incoming Goods Services Goods, and in the field Table 2 - Prices of Items Slice of the Last. In the connection conditions, select the fields Nomenclature from both tables.

It should also be noted that in the query selection we need to get all the rows from the tab-part Goods and prices only if they are available for the current date by document price type. Thus, these tabparts Goods are mandatory, but price cutoff data is not. Therefore, in the links between these tables, it is necessary to use the so-called LEFT JOIN, and the left (or mandatory) table will be Incoming Goods Services Goods, and the right (or optional) PriceItemSliceLast. In order for the left join of the query tables to work as I described above, you need to check the box All after the field Table 1.


The request is almost ready, it remains only to work a little on the field aliases. Go to bookmark Unions / Aliases and set an alias for the field PricesItemsSliceLast.Price. The alias name will be − PriceForToday, it is needed so that the names of the query selection fields and the names of the parameters in the layout of the printed form match.

The work in the query designer is over, let's press the OK button. After the constructor window closes, you will see that the line with the request text is filled in and looks like this:

Query.Text = "SELECT | Incoming Goods of Services Goods. Nomenclature, | Incoming of Goods of Services Goods. Amount, | Incoming of Goods of Services Goods. Price, | Incoming of Goods of Services Goods. Quantity, | .Goods AS Incoming GoodsServicesGoods |LEFT JOIN (| &CurrentDate, PriceType = &PriceType) AS PricesItemsSliceLast | By Incoming GoodsServicesGoods.Nomenclature | = PricesItemsSliceLast.Nomenclature |WHERE | Incoming GoodsServicesGoods.Reference = &Reference";

Execution of a request

We will pass the necessary parameters to the request, for this we will use the request method setParameter(<ИмяПараметра>,<Значение>). To get the current date, use the built-in function The current date(), it returns the date and time of the computer.

Let's execute a query to get a selection with the data we need. To do this, we first use the query method Execute(), and then the method Choose().

Selection = Query.Execute().Select();

Filling out the printable table

As a result, in the variable Sample will contain a selection of query results, you can navigate through it using the method Next(), and to bypass the whole one will need a loop Bye. The structure will look like this:

While Selection.Next() Loop EndCycle;

It is in this cycle that we will fill and display the layout area Data. But first, let's initialize two variables of a numeric type. In them we will collect the totals by the number and amount that we need to display in the area Basement.

TotalSum = 0; TotalNumber = 0;

Inside the loop, we will fill the area Data data from the current selection element into variables TotalSum And TotalNumber add sum and quantity values, and finally, display the area in a spreadsheet document using the method already familiar to us output(). Since the field names of our request are exactly the same as the field parameter names Data, then for filling we will use the built-in procedure FillPropertyValues(<Приемник>, <Источник>) that copies the property values<Источника>to properties<Приемника>.

While Selection.Next() Loop FillPropertyValues(DataArea.Parameters, Selection); TotalSum = TotalSum + Sample.Sum; TotalQuantity = TotalQuantity + Sample.Quantity; TabDoc.Output(DataArea); EndCycle;

Output of the footer of the printing form into a spreadsheet document

It remains to fill and display the last area of ​​the layout - Basement. We have already prepared the data for filling, filling and output are carried out according to the same scheme.

AreaBasement.Parameters.TotalQuantity = TotalQuantity; RegionBasement.Parameters.TotalAmount = TotalAmount; TabDoc.Output(RegionFooter);

The spreadsheet document is completely filled out, it remains to display it on the screen so that the user can view the printed form and, if necessary, print it. But in typical 1C 8 configurations, the procedures of special modules are responsible for the output of external printing forms. Therefore, it is enough to return from the function Seal() completed spreadsheet.

Return TabDoc;

At this stage, the programming is completed and the creation of the printable form 1c is almost complete. Full text of the function Seal() I won’t give it here, you can see it in a printable file, which you can download at the bottom of the article.

Creation of a printed form 1C. Auto-registration options

When connecting an external printable to the database, the system does not automatically determine for which particular document or directory the printable is intended, you have to select it manually. And if another person wrote the printed form, and you are only instructed to connect it, then the choice can become ambiguous. In order to avoid such problems, in all external printables it is necessary to create a layout with auto-registration parameters. If it is created and correctly formatted, the system automatically determines which document or directory the printed form is intended for.

It is done as follows:

  • In external processing, we create a new layout. We call it “Parameters_Autoregistration” (important not to be mistaken!).
  • In the first cell of the layout we write Documentation.(or Reference books.) and the name of the document to which you want to connect the printable.

Connecting to the base of an external printing form

  • Run 1C 8 in mode Company;
  • Go to menu Service -> Additional reports and processing -> Additional external printing forms;
  • Click the button Add;
  • In the window that opens, click the icon Replace external processing file;
  • If you have created auto-registration parameters, then we agree to use them;
  • If you have not created auto-registration parameters, then in the tabular section Accessory of the printing plate add the required document or directory;
  • We press the button OK.

After that, the external printable will be available in the menu Seal document Delivery of goods and services. The creation of a 1C printable on this can be considered complete.

How to add (register) an external printing form (or processing) in 1C Accounting 8.3 (version 3.0)

2019-05-15T13:40:54+00:00

Often an accountant needs an additional printed form to one of the standard documents 1C: Accounting 8.3 (version 3.0). Or additional processing is needed, for example, to automatically fill out a document or enter a new one based on. Usually such a feature has already been developed by someone and can be found or ordered from a programmer. And now the revision has been received, it remains only to add it to the accounting department. How to do it? More on this below in steps.

1. Open 1C Accounting 3.0 and select the section "Administration" -> "Print forms, reports and processing" in the left panel ():

2. Here, find and select the "Additional reports and processing" item, having previously checked the "Additional reports and processing" checkbox on the left:

3. Click the "Add from file..." button.

4. And select a file with an external printing form or processing (epf extension).

5. In the new window, click the "Save and close" button.

6. Open the desired document and make sure that the print button has another printable option or an item in the "Create Based on" menu or a new button on the form toolbar. Ready!

Sincerely, Vladimir Milkin(teacher and developer).

Good day!

For most organizations, the standard printed form of any contract in 1C programs is not suitable. Therefore, 1C provided the opportunity to add additional printing forms for documents and other objects. In this article, I want to tell you how to create and connect an external printable contract form that will open in Microsoft Word.

Connecting additional external printing forms

Launching 1C:Enterprise. Open the directory "Additional external printing forms" through the menu "Service" - "Additional reports and processing".

Click the "Add" button, then register a new printable by clicking "Replace External Processing File". The belonging of the printed form to the document "Sales of goods and services" will be automatically filled in. Select "Agreement" in the "Replaced printing plate" column so that the standard printing plate is no longer used.

We launch 1C:Enterprise, open the "Contractors" directory, select the counterparty for which our contract will be printed, and by clicking the "Files" button, go to the "Storage of additional information" directory, load the template for the contract into it and, of course, call it "Agreement" , as shown in the figure below, otherwise the program will not be able to find the layout for the printable.

Now we open any document "Sales of goods and services" and press the button "Print" - "Agreement". A Microsoft Word document with the contract will open.

The external printed form "Agreement" and the layout for it can be downloaded from the links below.

Employment contract layout in Microsoft Word format

There are at least three ways to create a template:

1. Key phrases are created in the Word document, for example, "[Agreement Number]", then, in the processing module, the values ​​are searched and replaced.

2. Bookmarks are created in the Word document, which can then be accessed by name. The disadvantage of this method is that the label must be unique, i.e., if you need to insert the employee's last name in each paragraph of the text, you will have to make several bookmarks with different names.

3. Service fields are added to the Word document, for example, "DocVariable" or "Author". Using DocVariable, you can refer to a variable by name, for example, "DocumentWord.Variables.Add(VariableName, VariableValue);", but it is not visible in the template. The "Author" field is displayed in the template, but it will have to be accessed in a loop by index: "DocumentWord.Fields.item(Index).Result.Text = Value;".

In my opinion, the first way is the most optimal. The document template is easy to edit, key phrases are visible in the text. Therefore, we create a template in this way.

Open the Microsoft Office program. For example, add a couple of lines, as shown in the figure below, and save the template.

Creating an external printing form "Agreement"

We launch 1C:Enterprise in the "Configurator" mode and through the "File" - "New" menu we create external processing. We add the attribute "Link to the object" and the layout "Parameters_Autoregistration" with the type "Spreadsheet document". The attribute type "Object Link" depends on the objects for which the printable will be used, in our case the printable will be used for the document "Sale of goods and services", so we specify the type "DocumentLink.Sale of Goods and Services".

Development of a printing procedure

This article describes how to connect an external printing form to the 1C database using the Trade Management 11.2 configuration as an example.

The "Trade Management 11.2" configuration is a configuration on "MANAGED" forms!

Our instruction "shows" how to connect an external printing form in the 1C infobase with a configuration on "MANAGED" forms, namely:

  • "Accounting 3.0"
  • "Trade Management 11.2"
  • "Salary and personnel management 3.1"
  • "Integrated Automation 2.0"
  • "Small Business Management 1.6"
  • "Retail 2.2"
  • and other similar configurations.

In order to connect an external printing form in 1C, we need to go through 11 steps.

1 - Menu "NSI and administration" (In other configurations, such as in Enterprise Accounting 3.0, it may be called simply - "Administration"). 2 - Select "Print forms, reports and processing" (see the figure below ↓)

3 - Expand the "Reports and processing" submenu (In other configurations, such as in Enterprise Accounting 3.0, such a submenu may not appear, so we immediately proceed to the next step). 4 - Check the box Use additional reports and processing. 5 - Go to the section: Additional reports and processing. (see pic below ↓) ()

6 - Click the "Create" button. (see pic below ↓)

In new versions of 1C (starting from August 2016), the program has a built-in warning mechanism about the danger of using unknown external processing that may contain "viruses", in earlier versions of the program the warning will not appear! If it has arisen, then to connect an external printing form it will be necessary - 7 - click the "Continue" button. (see pic below ↓)

8 - Select the directory in which the processing is located. 9 - We select it (the processing we need). 10 - Click the "Open" button. Or, instead of steps 9 and 10, you can simply double-click on the external printable we need in the selection window. (see pic below ↓)

If we need to add a location for the added processing (For example, this is the Universal Contract Form from our website and we need the command to print this form to be displayed in some object that is not initially displayed) — 11 - click on the placement line (“Place in:”, maybe “Placement:”) and select the necessary directories and documents. 12 - We complete the steps for connecting an external printing form by pressing the "Save and close" button. (see pic below ↓)

That's all! Congratulations! External printing plate connected! Have we done everything right? Let's check...

Before Recording and closing, we noticed that this external printing form is located in the document Sales of goods and services, which means that we open any document of the form: “Sales of goods and services” for printing. press the "Print" button and see - a window for selecting printing forms has appeared, among them there is - 13 — an external printing plate connected by us (see the figure below ↓)

Now it's all right. We hope this article was helpful to you.

It's no secret that, although in our time an increasing number of companies are switching to electronic document management, the old saying "Without a piece of paper you ..." does not lose its relevance. It so happened that for some reason the inspection bodies are primarily interested in paper documents. Therefore, if you actively use the 1C: Accounting or Enterprise program for financial control, it is important to know how to print an electronic document created using the program.

Printable forms in 1C allow you to transform an electronic document into a printed version.

To do this, the developer has provided an excellent tool - Print Constructor. With it, you can create documents in which you can specify any data you need, and not just a few standard forms. This is especially true for those documents that do not have a strictly regulated form, which in no case can be changed. This, in particular, includes an act of work performed, some invoices or payments.

In this guide, we propose to understand the capabilities of the Print Designer, consider what types of printing forms can be and how they differ from each other. We will also show with an example how to print the created form.

To begin with, it’s worth figuring out what, in general, is a printable in 1C 8. This is a 1C spreadsheet template (like Excel), in which some variable lines are indicated that are filled with data from the program when the document is drawn up.

There are two types of printables:

  • Internal (built-in). They are stored in the program configuration, so it's better not to change them, as problems may arise during the update later.
  • External - stored separately from the program settings. And with their help, you can create and prepare for printing a document of almost any complexity without affecting the configuration of the 1C 8 program.

How to choose already prepared layouts? After you carry out an income or expense operation, for example, write out an act of completion, you click the "Print" button to print the documents. The list displays a list of printable forms that are already filled in with the entered data about the transaction and your company. By clicking on the type of document you need, you open a preview window so that you can make sure that the data filled in is correct. The print button outputs the document to the printer.

With the basics out of the way, let's figure out where all your printables are stored. Let's move on to the next question.

Where are printables stored?

You can view the built-in printables both in the configurator mode and in the normal enterprise mode. In the first case, you need to press the corresponding button in the start window when starting the program. You will see the program menu, find the “Realization of Goods and Services” branch, which contains the “Layouts” item. It often contains only two items - "Invoice" and "Act". Where, then, is everyone else, because the list is much more extensive? They are just hiding somewhere else. You need to open the “General” - “General Layouts” branch, almost all layouts are stored in it.

In the second case, you need to go to the menu section "Administration" - "Print forms, reports and processing" - "Print forms layouts". It will display all document layouts. It is noteworthy that in the same menu they can be edited.

As for external forms, they must first either be created through the configurator mode, or by downloading a ready-made file, and then connected in the "Administration" - "Printed forms, reports and processing" - "Additional reports and processing" menu. We will talk about this a little later.

Creating a simple form through the built-in Print Constructor

Such a printable does not imply the possibility of deep editing, since this will entail a change in the configuration of the program, as well as further difficulties when updating it. However, if you are completely satisfied with the standard form, or if you want to delve into the intricacies of creating an external form, this method is completely suitable for you.

  1. First of all, start in the Configurator mode, find the document you need, for example, Realization of Goods and Services, in the document properties, go to Actions - Constructors - Print Designer.
  2. When prompted for a job option, select Common Forms.
  3. Give the new layout a name, such as "Invoice Print".
  4. Select the details that you would like to see in the header of the document. Moreover, they must be selected in the order in which they will be displayed. To select, you need to highlight the item in the left column with the cursor and click the arrow in the middle of the screen so that the attribute is displayed in the right column.
  5. Mark the details to be displayed in the tabular section. The choice of details follows the same principle as in the previous paragraph.
  6. In the same way, select the details of the bottom of the document.
  7. At the final stage of creation, choose whether you want to print immediately without previewing, whether you need table protection, and then confirm the creation of the form with the OK button.

Creating an External Printable

Forms created through the Print Designer can be compared to a visual program editor, when you do not enter all the code manually, but only compose it from the proposed elements. The external form is a file with manually written program code, which describes the procedure for displaying data on the screen. This is what allows you to edit the printed form, as you like, specifying absolutely any data in any sequence.

An additional advantage is that, even if you do not understand or simply do not want to understand the intricacies of 1C 8 programming, you can entrust this procedure to professionals. They will be able to prepare the necessary form for you, provide it to you in the form of a ready-made file, which you only activate with a few clicks of a button.

Now more about the procedure itself. Consider the example of creating an "Account" layout for the document "Implementation (acts, invoices)".

  1. Open the 1C 8 program in the Configurator mode.
  2. Click File - New - External Processing, give it a name (it shouldn't include spaces), then click Actions - Open Object Module.
  3. In the input field that opens, enter the following code (values ​​that can be changed to your own are highlighted in yellow):

Function DetailOnExternalProcessing() Export
RegistrationParameters = New Struct;
AssignmentArray = New Array;
Array of Assignments. Add("Document. Realization of Goods of Services"); //Specify the document to which we make an external print. form
RegistrationParameters.Insert("View", "PrintForm"); //may be - PrintingForm, Filling in an Object, Additional Report, Creating Related Objects ...
RegistrationParameters.Insert("Assignment", Assignment Array);
Registration Parameters.Insert("Name", "Order for the sale of goods"); //name under which the processing will be registered in the directory of external processing
RegistrationParameters.Insert("SafeMode", FALSE);
RegistrationParameters.Insert("Version", "1.0");
RegistrationParameters.Insert("Information", "This printable form was created as a sample");
CommandTable = GetCommandTable();
AddCommand(CommandTable, "External Order", "External Order", "ServerMethod Call", True, "PrintMXL");
RegistrationParameters.Insert("Commands", CommandTable);
Return ParametersRegistration;
EndFunction // ExternalProcessing Details()
GetCommandTable() function
Commands = New ValueTable;
Commands.Columns.Add("View", New TypeDescription("String"));//how the description of the printable form will look like for the user
Commands.Columns.Add("Identifier", NewTypeDescription("String")); //print form layout name
Commands.Columns.Add("Usage", NewTypeDescription("String")); //Call ServerMethod
Commands.Columns.Add("ShowAlert", NewTypeDescription("Boolean"));
Commands.Columns.Add("Modifier", NewTypeDescription("String"));
Team return;
EndFunctions
Procedure AddCommand(CommandTable, View, Identifier, Usage, ShowAlert = False, Modifier = "")
NewCommand = CommandTable.Add();
NewCommand.View = View;
NewCommand.Identifier = Identifier;
NewCommand.Use = Use;
NewCommand.ShowAlert = ShowAlert;
NewCommand.Modifier = Modifier;
EndProcedure

  1. Save the layout for printing as a file to any folder on your hard drive, name it accordingly.

Insert the procedure for starting printing from the program menu into the same document (the commands highlighted in yellow must match the line):

AddCommand(CommandTable, "External Order", "External Order"):
Procedure Print(Array of Objects, Collection of Print Forms, Print Objects, Output Parameters) Export
PrintManagement.OutputSpreadsheetDocumentToCollection(
CollectionPrinted Forms,
"External Order"
"External Order"
GeneratePrintForm(ArrayObjects,PrintObjects);
EndProcedure // Print()

  1. Insert the layout of the printed form filling by clicking on the name of the external form in the lower left corner and selecting "Layouts" - "Add" - "Spreadsheet Document", give it a name. After that, fill in the spreadsheet with the required data. For example:
    • Order for item No. [ReleaseNumber] from [ReleaseDate] - right-click - Properties - Layout - Filling - Template.
    • Create the columns you want to appear in your document.
    • Select the entered cells, click Table - Names - Assign a name - enter the name "Header".
    • Copy the line with the table headers, select them, right-click - Properties - Layout - Filling - Parameter.
    • Select the line, name it, for example, "String TH".
    • Create a footer: write Total, the cell in which the total amount should be displayed, name SumTotal, select "Parameters" in the properties.
    • Specify the person in charge, in the properties of the cell for displaying the last name, specify "Parameters".
    • Select the bottom rows and name the range "Footer".
  2. Now, in the input window, write the function for generating a printed form:

Function GeneratePrintForm(ReferenceToDocument,PrintObjects)
SpreadsheetDocument = New SpreadsheetDocument;
SpreadsheetDocument.PrintParameterName = "PRINT_PARAMETERS_InvoiceForVRTU";
ProcessingLayout = GetLayout("InvoiceForPaymentExternal");
// fill in the header
AreaHat = LayoutProcessing.GetArea("Hat");
AreaHeader.Parameters.DocumentNumber = LinkToDocument.Number;
AreaHeader.Parameters.DocumentDate = LinkToDocument.Date;
AreaHeader.Parameters.OrganizationName = LinkToDocument.Organization.Name;
//display the header in a spreadsheet document
SpreadsheetDocument.Output(RegionHeader);
//fill in the PM lines
StringScope =ProcessingLayout.GetRegion("StringP");
For Each CurrentRow From ReferenceToDocument.Products Loop
FillPropertyValues(RowArea.Parameters, CurrentRow);
SpreadsheetDocument.Output(StringArea);
EndCycle;
//fill footer
AreaFooter = LayoutProcessing.GetArea("Footer");
AreaFooter.Parameters.QuantityTotal = LinkToDocument.Products.Total("Quantity");
AreaFooter.Parameters.AmountTotal = LinkToDocument.Products.Total("Amount");
RegionFooter.Parameters.OwnerName = LinkToDocument.Manager.Name;
//output the footer into a spreadsheet document
SpreadsheetDocument.Output(RegionFooter);
SpreadsheetDocument.AutoScale = True;
Return SpreadsheetDocument;
EndFunctions

  1. Save your changes to the document.
  2. Now you need to activate the created form. For this:
    • Go to "Administration" - "Print forms, reports and processing" - "Additional reports and processing".
    • Click the "Create" button, select the external form file in the explorer, confirm the entry with the "Save and close" button.
  3. To check, go to Sales - Implementation (acts, invoices), click the "Print" button, select your form and check that it is filled out correctly.
  4. Print the document if needed.

Conclusion

We reviewed with you a sample of creating a printable form through the Print Designer and through the external form creation tool. We hope that everything will work out for you. Leave your questions in the comments.