1c setting up the layout of the printed form. Publications. Where are printed forms stored?

So! There is a configuration (for example, “Trade Management”, edition 10.3), and for it it is necessary to develop an external printed form. For example, let’s take the standard document “Invoice for payment to the buyer” (although external printed forms can be created not only for documents, but also for reference books).

Example for 1C 8.3 (Managed forms)

An example of developing an external printed form for a managed application can be viewed.

Task

Develop an external printed form that will be available from the document “Invoice for payment to the buyer”, and which will contain the name of the organization, the counterparty and a list of goods with price, amount and quantity.

Go!

The first thing you need to do is create an external processing file. Processing should contain three main points:
  1. “Object Link” attribute with type “DocumentLink.Invoice for Payment to Buyer”
  2. The layout that will be printed
  3. Export Function "Print()" which returns a spreadsheet document
These actions are visible in Figure 1

"Drawing a layout"

Our layout will contain two areas:
  1. The title (header) of the document (in this area the names of the organization and the counterparty will be placed), and the table header (with the names of the columns)
  2. Table with goods (columns with name, quantity and amount)
Figure No. 2 shows the layout of the external printing form. Please note that the table and header cells contain parameters, not just text.

Function "Print()"

The form is almost ready. All that remains is to write a programmatic filling of the fields of the spreadsheet document. These actions are performed in the processing object module, in a function called “Print”, which MUST be exportable.
Stage No. 1. Receiving data for the header, filling out the header parameters, and outputting it to a spreadsheet document TabularDocument = New TabularDocument; Layout = GetLayout("OurLayout"); Data Request = New Request("SELECT | REPRESENTATION(Invoice for Payment to the Buyer. Counterparty) AS Counterparty, | REPRESENTATION(Invoice for Payment to the Buyer. Organization) AS Organization | FROM | Document. Invoice for Payment to the Buyer AS Invoice for Payment to the Buyer | WHERE | Invoice for Payment to the Buyer. Link = &Link"); Data Request.SetParameter("Link", ObjectLink); Header = DataRequest.Execute().Select(); Cap.Next(); Area = Layout.GetArea("Header"); Area.Options.Fill(Header); TabularDocument.Output(Area); Stage No. 2. Receiving tabular data and line-by-line output of products
Data Request.Text = "SELECT | _Products.Line Number, | REPRESENTATION(_Products.Nomenclature) AS Nomenclature, | _Products.Quantity, | _Products.Price, | _Products.Amount |FROM | Document.Invoice for Payment to the Buyer.Products AS _Products |WHERE | _Products. Link = &Link"; Fetch = DataRequest.Execute().Select(); Area = Layout.GetArea("Data"); While Selection.Next() Loop Area.Parameters.Fill(Selection); TabularDocument.Output(Area); EndCycle; Stage No. 3. Return spreadsheet document and print function return TabularDocument;

Adding our external printing form to 1C

Go to the menu "Service - External printing forms and processing - External printing forms"

In the element creation window that opens, perform the following actions:

  1. Loading the external processing file
  2. We indicate for which configuration document (or directory) the printed form is intended
  3. Recording changes

Let's print!

Open any document “Invoice for payment to the buyer” (with the tabular part “Products” filled in, because that’s where we get the data to fill out), click the “Print” button, in the window that opens, select OUR printed form, and click “Print”


ATTENTION! This development algorithm is ONLY suitable for a “Regular application”. The printables for Application Managed configurations are different!

The file of the printed form shown in the example can be

This article describes how to connect an external printed form to a 1C database using the example of the “Trade Management 10.3” configuration

The “Trade Management 10.3” configuration is a configuration on so-called “REGULAR” forms, and not on “MANAGED” forms like “Trade Management 11.2”; for “MANAGED” forms we recommend reading.

Our instructions “show” how to connect an external printed form in 1C with configuration on “REGULAR” forms, namely:

  • "Accounting 2.0"
  • "Trade Management 10.3"
  • "Salary and personnel management 2.5"
  • "Comprehensive automation 1.1"
  • "Control manufacturing enterprise 1.3"
  • "Retail 1.0"
  • and other similar configurations.

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

1 - Menu "Service". 2 — Select “External printing forms and processing”. 3 — Next — “External printed forms” (see figure below ↓)

To convince you that this instruction suitable for other configurations on “REGULAR” forms - let’s imagine the same initial 1-2-3 step, but not in “Trade Management 10.3”, but in “Accounting 2.0” everything is the same there with the exception of slightly changed words in the subparagraphs, namely...

1 — “Service” menu (the same as in “UT 10.3”, and in others).
2 - Here “Additional reports and processing”, and not “External printed forms and processing” as in “UT 10.3”,
but still the meaning is the same and is located there in the “Service” menu.
3 - And then - “Additional external printing forms”, i.e. extra word “Additional” when compared with “UT 10.3” (see figure below ↓)

Next, we will continue using the example of “Trade Management 10.3” without unnecessary comparisons.
4 — Click on the “+” button i.e. "Add". 5 — A button where the folder is drawn (when hovered, a hint will appear: “Replace external processing file”).

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 occurs, then to connect external processing it will be necessary - 6 - click the “Continue” button. (see figure below ↓)

7 — Select the directory in which the external printing form file we need is located. 8 — Select our file. 9 — Click “Open” (see figure below ↓)

10 — An external printed form may have auto-registration parameters, as in our case, here it makes sense to click “Yes” - thereby using these parameters during registration, i.e. automatically select those objects (documents or maybe, for example, directories) in which it will be possible to use a connected external printed form (see figure below ↓)

That’s all, we have filled out the table “Affiliation of the printed form”, thanks to the auto-registration parameters, we see the name of the connected external printed form, perhaps you will have the “Comment” field filled in, etc. You can add your objects to the “Print Form Ownership” table, for example, for our “Universal Printable Contract Form” processing, which supports printing of many documents and reference books, but auto-registration parameters are set only for the main ones: 10* — Click on the green “Add” button and select which objects to also place for processing. Now all that remains is - 11 - click on the “OK” button and (see figure below ↓)

Now it’s worth checking - did we do everything right?
To do this, we select an object to check, for example, the document “Sales of goods and services”, which is indicated in the table “Affiliation of the printed form”, this means that the connected printed form can be used in this document! Let's check... (see figure below ↓)

To check whether printing is possible, open any document of the form: “Sales of goods and services.” 13 — Click the “Print” button.
We see that a window for selecting printed forms has appeared, among them there is - 14 — external printing form connected by us (see figure below ↓)

As is known - without a piece of paper you... no serious business can do without. And when we say that 1C has some kind of electronic documents, the question immediately arises of how to print them in paper form.

The process of printing an electronic document 1C is called printing form 1C.

Each document can have several 1C printed forms. For example, the document Sales of goods and services (i.e. sale) is printed in 1C printed forms: TORG-12, Invoice, Consignment note, Certificate of services rendered, and so on.

The essence of the 1C printed form is a template (such as an Excel document) in which variables are specified. During the printing process, text from the electronic document is substituted for variables. The template is usually stored in the configuration.

The problem with changing a standard 1C printed form is that it is usually not advisable to change the standard configuration, otherwise it will be more difficult to update. Therefore, various methods for using external 1C printing forms appeared and began to reinvent the wheel.

An external 1C printing form is a printing template that is stored somehow separately from the configuration itself.

However, this is all theory. How to create your own printed form? Or better yet, how to make changes to an existing one?

How a 1C document is printed

To print any 1C document (which can be printed), you need to click the Print button in the document. 1C will offer to select a 1C printed form for this document from the list.

To the left of the Print button there is usually a quick access button to the last selected 1C printing form.

The print result looks like this. To print it to a printer, you need to place the cursor in the 1C printing form, press Ctrl+P or the printer button on the button panel or in the File/Print menu.

Print settings (margins, sheet orientation, etc.) are located in the File/Page Setup menu. You can also configure the user settings to print directly to the printer.

Where does this printing form come from?

Where is the 1C printed form located?

Let's go to the configurator. Find it in the configuration window required document. Let's expand its Layouts branch. It is they who turn into the 1C printing form when printed.

However, it will not be enough - we were offered to choose many more options when printing. The fact is that many 1C printed forms layouts are hidden in another place.

Let's go back to the top of the 1C configuration window. Let's open the General branch, and then the General Layouts branch. This is where most of the layouts are located. This is especially true for state-regulated printed forms 1C - TORG 12, Invoice, etc.

By the way, it’s not difficult to notice that you will see several layouts of TORG12 or Invoice. Why? It's easy to explain. Laws and requirements change periodically. But we can't just change the same layout - and if we have to print the document from a date that is earlier than the change date. Therefore, several layouts are made and, depending on the date of the document, the correct one is used.

But that's not all! There are also external layouts. Where are they stored?

Let's return to 1C Enterprise mode. Via the user menu with administrative rights Operations/Directories, select the External processing directory.

The lines of this directory, which have the form Printing form, add printing options for the document specified in the table Ownership of the printing form (in the picture this is Sales of goods and services).

In order for this to work, you must make an external processing that has a Print() procedure in its object module labeled Export, which organizes the printing process.
But we are getting ahead of ourselves. Let's first look at how the layout of the 1C printing form is organized.

Layout of printed form 1C

The layout of the 1C printing form looks like this.

As you can see, it is divided into blocks. Blocks can be horizontal (name on the left) or vertical (name at the top).

The layout itself, as it is, is not printed. Individual blocks are printed. The programmer in the print processing procedure specifies the order of blocks and the number of repetitions of each block. As a result, the printed form is formed.

In order to assign an area, select several rows (or several columns) and select Table/Names/Assign a name from the menu. To remove it, there is also the Remove name command.

The name is needed so that the area can be accessed from program code. The name can be assigned not only to rows or columns, but also simply to several cells. To do this, select the cells and select the same menu.

However, by default, custom cell names are not displayed. To see them, select the menu item Table/Names/Display named cells.

So, today we learned that a 1C printed form is formed using a layout. The layout consists of blocks – cleverly called areas.

Typical (commonly used) blocks for printing plates:

  • Header – the title of the document is displayed
  • Row – one row of the table is displayed, this block is repeated as many times as the rows need to be printed
  • Footer – the end of the document is displayed.

Now we need to deal with the

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

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

For this, the developer has provided an excellent tool - Print Designer. With its help, 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 cannot be changed under any circumstances. This, in particular, may include an act of completion of work, some invoices or payments.

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

First, it’s worth understanding what, in general, a printed form is in 1C 8. This is a 1C spreadsheet template (like Excel), in which some variable rows are specified, filled with data from the program when drawing up a document.

Printing forms come in two types:

  • Internal (built-in). They are stored in the program configuration, so it is better not to change them, as problems may arise later during the update.
  • 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 incoming or outgoing operation, for example, writing out a report of completed work, you click the “Print” button to print the documents. The list displays a list of printable forms that are already filled with entered data about the transaction performed and your company. By clicking the type of document you need, you open a preview window so you can make sure the data you filled in is correct. The print button prints 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 printed forms stored?

You can view the built-in printed forms both in the configurator mode and in the normal enterprise mode. In the first case, you need to click the corresponding button in the start window when starting the program. You will see the program menu, find the “Sales of Products and Services” branch, which contains the “Layouts” item. It often contains only two items - “Invoice” and “Act”. Where is everyone else then, since the list is much more extensive? They're 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” - “Layouts of printed forms”. It will display all document layouts. It is noteworthy that they can be edited in the same menu.

As for external forms, you first need to either create them through the configurator mode, or by downloading a ready-made file, and then connect them to the “Administration” menu - “Printed forms, reports and processing” - “Additional reports and processing”. We'll talk about this a little later.

Creating a simple form using the built-in Print Designer

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

  1. First of all, launch into the Configurator mode, find the document you need, for example, Sales of Products and Services, in the document properties go to Actions - Designers - Print Designer.
  2. When prompted for a work option, select Regular Forms.
  3. Give the new layout a name, for example, “Print Invoice.”
  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 press the arrow in the middle of the screen so that the details appear in the right column.
  5. Mark the details to be displayed in the table section. The selection of details follows the same principle as in the previous paragraph.
  6. In the same way, select the details of the lower part of the document.
  7. At the final stage of creation, select whether you want to print immediately without preview, whether you need to protect the table, and then confirm the creation of the form with the OK button.

Creating an external printing form

Forms created through the Print Designer can be compared to a visual software 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 however 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 can prepare for you the required form, will provide it to you as a ready-made file, which you just activate with a few clicks of a button.

Now let's talk more about the procedure itself. Let's look at the example of creating an “Invoice” layout for the document “Sales (acts, invoices)”.

  1. Open the 1C 8 program in Configurator mode.
  2. Click File - New - External Processing, give it a name (it should not 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 InformationOnExternalProcessing() Export
Registration Parameters = New Structure;
ArrayDestinations = New Array;
Array of Assignments.Add("Document.Sales of Goods and Services"); //Specify the document for which we are making an external print. form
Registration Parameters.Insert("View", "PrintForm"); //maybe - PrintableForm, Filling Object, Additional Report, Creating Related Objects...
Registration Parameters.Insert("Destination", Array of Destination);
Registration Parameters.Insert("Name", "Order for sale of goods"); //name under which the processing will be registered in the directory of external processing
Registration Parameters.Insert("SafeMode", FALSE);
Registration Parameters.Insert("Version", "1.0");
Registration Options.Insert("Information", "This printable form was created as a sample");
CommandTable = GetCommandTable();
AddCommand(CommandTable, "External Order", "ExternalOrder", "CallServerMethod", True, "MXL Print");
Registration Parameters.Insert("Commands", CommandTable);
ReturnRegistrationParameters;
EndFunction // Information ABOUT External Processing()
Function GetTableCommand()
Commands = New ValueTable;
Commands.Columns.Add("View", New TypeDescription("Row"));//what the description of the printing form will look like for the user
Commands.Columns.Add("Identifier", New TypeDescription("String")); //print form layout name
Commands.Columns.Add("Usage", NewTypeDescription("Row")); //Call ServerMethod
Commands.Columns.Add("ShowAlert", NewTypeDescription("Boolean"));
Commands.Columns.Add("Modifier", NewTypeDescription("Row"));
Return Team;
EndFunction
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;
End of Procedure

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

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

Add Command(Table of Commands, “External Order”, “External Order”):
Procedure Print(Array of Objects, Collection of PrintForms, PrintObjects, Output Parameters) Export
Print Management.Output TabularDocumentIntoCollection(
Collection of Printing Forms,
"External order"
"External order"
GeneratePrintForm(ArrayofObjects, PrintObjects);
EndProcedure // Print()

  1. Insert a layout for filling out the printed form 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 out the spreadsheet with the required data. For example:
    • Order for product No. [Realization Number] from [Realization Date] - right-click - Properties - Layout - Filling - Template.
    • Create the columns that you want to appear in your document.
    • Select the entered cells, click Table - Names - Assign a name - enter the name “Header”.
    • Copy the row with the table headers, select them, right-click - Properties - Layout - Filling - Parameter.
    • Select a line and name it, for example, “StringTCH”.
    • Create a footer: write Total, the cell in which the total amount should be displayed, name it TotalTotal, select “Parameters” in the properties.
    • Specify the person responsible, and in the cell properties for displaying the last name, specify “Parameters”.
    • Select the bottom rows and name the range "Footer".
  2. Now in the input window, enter the function for generating a printed form:

Function GeneratePrintForm(LinkToDocument, PrintObjects)
TabularDocument = New TabularDocument;
TabularDocument.Name of Print Parameters = “PRINT_PARAMETERS_Invoice for Payment to VRTU”;
Processing Layout = GetLayout("Payment InvoiceExternal");
//fill the header
AreaHeader = ProcessingLayout.GetArea("Header");
AreaHeader.Parameters.DocumentNumber = LinkToDocument.Number;
AreaHeader.Parameters.DocumentDate = LinkToDocument.Date;
AreaHeader.Parameters.OrganizationName = LinkToDocument.Organization.Name;
//output the header in a spreadsheet document
TabularDocument.Output(HeaderArea);
//fill in the PM lines
RowArea = ProcessingLayout.GetArea("ROW");
For Each Current Line From Document Link.Products Cycle
FillPropertyValues(RowArea.Parameters, CurrentRow);
TabularDocument.Output(RowArea);
EndCycle;
//fill the basement
AreaFooter = ProcessingLayout.GetArea("Footer");
AreaFooter.Parameters.QuantityTotal = LinkToDocument.Products.Total("Quantity");
AreaFooter.Parameters.AmountTotal = LinkToDocument.Products.Total("Amount");
AreaFooter.Parameters.ResponsibleName = LinkToDocument.Manager.Name;
//output the footer to a spreadsheet document
TabularDocument.Output(AreaFooter);
TabularDocument.AutoScale = True;
return TabularDocument;
EndFunction

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

Conclusion

We looked at an example of creating a printable form through the Print Designer and through the tool for creating external forms. We hope everything works out for you. Leave your questions in the comments.

Instructions

Open the 1C:Enterprise program version 8. Pay attention to the menu item “Service” - “External processing and printing forms”. With its help, you can store external reports, processing, printed forms, as well as processing for filling tabular elements. Also you can connect external form instead of changing an existing one, which would entail interfering with the program configuration.

Launch the 1C:Enterprise program in configurator mode, then create external processing, to do this, execute the command “File” - “New”. In the window that appears, select “External Processing”. A new external processing form will appear on the screen. Give it the name “External”. Then add a new attribute called “Object reference”, specify the type for it – “Document. Link. Sales of goods and services." To create a printable for a different type of document, use the appropriate link type.

Add a new layout by clicking on the corresponding button in the window new form. Name it “Layout”, create an area called “Header”, give it the parameter “Header Text”. Then click on the “Actions” button, select the “Open object module” command. Then insert the module text, you can use the example posted on the website http://www.uasoft.com.ua/content/articles/315/.

Launch the 1C:Enterprise program, go to the Tools menu, select External Printing Forms. Add a new entry to the list of forms. To do this, select the created processing file, and in the tabular section, indicate that the form belongs to the “Sales of goods” document. Check that the new printing plate is working correctly. To do this, open the created document, trace it, then at the bottom of the screen click on the “Print” button, select the “External printing form” option.

Sources:

  • how to change a printed form in 1c

In order to create and edit object forms, the 1C:Enterprise program provides a special form editor (or Form Designer). Application solution object forms are designed to visually represent data while working with the program. The form editor contains several tabs that provide the ability to edit all form elements.

You will need

  • computer, 1C program

Instructions

Using the form editor, you can add one or more “Group – Pages” elements to the form; to do this, click on the green plus sign in the upper left corner of the editor while on the “Elements” tab.
In 1C:Enterprise mode, all existing group elements will be displayed each on a separate tab. To position it above or below the working one, in the “Properties” window of a particular group, in the “Display” item, select the appropriate command.

You can also add elements to the form by dragging the required details into the element tree. To make it easier to navigate form controls when editing or entering data, set the order that suits you, arranging elements in the tree and subordinating them to other elements, and setting the properties of group elements to suit your needs.
To edit form details - change them, create new ones or delete them, use the panel in the details tree area on the corresponding tab.

To edit the command interface, go to the appropriate tab. You will see a command tree, the main branches of which are the “Navigation Panel” and the “Command Panel”. Some commands are added to the command interface tree automatically, but you can also add them yourself by dragging the commands you need from the list of global (general) commands or from the list of form commands.

Form commands are edited in the corresponding list. You can add them, remove them from the list, set properties for each command using the properties palette, which you can call by clicking on the pencil icon in the command line of the list.
To edit form parameters, go to the “Parameters” tab, where you can also add them, delete them, and set the desired properties.

Video on the topic

Chart of accounts used in accounting to display economic activity enterprise, supports a multi-level hierarchy: account - sub-accounts. So that the user can view the data contained in the chart of accounts and correct them, the 1C system allows you to change the form of the account. In addition, the printed form of the invoice can be changed in any other document in 1C.

You will need

  • - personal computer with 1C.

Instructions

Analytical accounting is provided for each account or subaccount. Therefore, when creating and subsequently editing a chart of accounts in 1C, the required number of sub-accounts, that is, analytical accounting objects, can be supplied. Moreover, adjustments to accounts and subaccounts can be made by both the user working with automated system accounting and software developer.