Template in printed form 1s 8.3

It’s no secret that, although nowadays more and more companies are switching to electronic document management, the old saying “Without 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 the 1C: Accounting or Enterprise program for financial control, 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 will be able to prepare the required form for you and provide it to you as a ready-made file, which you can only 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.

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

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

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

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

2. Here, find and select “Additional reports and processing”, after checking the “Additional reports and processing” checkbox on the left:

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

4. And select the file with 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 another printable form option appears in the print button 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 afternoon.

Today I want to tell you how to create external printed forms for the “Salary and Personnel Management 3.0” configuration. As you know, ZUP 3.0 uses a library of standard subsystems, which means the processing structure looks completely different. When I first had to make a printed form for the BSP in managed forms (then it was UT 11), the first thing I did was go to the ITS disk in order to find detailed documentation there about what export procedures, what parameters should be processed and how it all works. Here ITS disappointed me a little, because... everything is told there about how the procedures should look in the document module, and in the external printed form the parameters of the “print” procedure are rearranged, so I had to look for information in other sources and tinker with the subsystem from the inside.

Well, let's begin. What we get at the end can be used as a template.

Step one- obvious. Let's create a new processing. Let's assign it an arbitrary name: "Print Sample".

Step two. Let's create a layout. Since we have a test example, I will create the simplest layout, without a single parameter.

Step three- The most interesting. Open the object module and start programming. According to the BSP, when registering an external processing, it (the processing) must indicate what it can do, what objects it is attached to, and what it is called. When asked what processing it can do, it should return a list of commands - this is a table of values. In our case, the processing can output one printed form, so there will be only one command. To generate a table of values, we will define a couple of procedures that will always be the same in all external printed forms:

//procedure that prepares the command table structure

Function GetTableCommand()

// Create an empty command table and columns in it
Commands = New ValueTable;

// What the description of the printed form will look like for the user
Commands.Columns.Add("View", NewTypeDescription("Row"));

// The name of our layout, so that we can distinguish the called command in print processing
Commands.Columns.Add("Identifier", New TypeDescription("String"));

// This sets how the processing command should be called
// Possible options:
// - OpeningForm - in this case, the identifier column should indicate the name of the form that the system will open
// - CallClientMethod - call the client export procedure from the processing form module
// - Call ServerMethod - call a server export procedure from the processing object module
Commands.Columns.Add("Usage", New TypeDescription("Row"));

// The next parameter specifies whether a notification should be shown when a processing job starts and ends. Doesn't make sense when opening the form
Commands.Columns.Add("ShowAlert", NewTypeDescription("Boolean"));

// For a printed form, it must contain the string PrintMXL
Commands.Columns.Add("Modifier", New TypeDescription("Row"));

Return Team;

EndFunction

//Creates a new row in the command table

Function AddCommand(CommandTable, View, Identifier, Usage, ShowAlert = False, Modifier = "")
NewCommand = CommandTable.Add();
New Team. View = View;
New Team. Identifier= Identifier;
New Team. Usage = Usage;
New Team. ShowAlert= ShowAlert;
New Team. Modifier= Modifier;
EndFunction

Function InformationOnExternalProcessing() Export
Registration Parameters = New Structure;
ArrayDestinations = New Array;
Array of Assignments.Add("Document.Hiring");
Registration Parameters.Insert("View", "PrintForm"); //maybe - Filling an Object, Additional Report, Creating Related Objects...
Registration Parameters.Insert("Destination", Array of Destination);
Registration Parameters.Insert("Name", "Hello World"); //name under which the processing will be registered in the directory of external processing
Registration Parameters.Insert("Version", "1.0");
Registration Parameters.Insert("SafeMode", TRUE);
Registration Parameters.Insert("Information", "SAMPLE");//this is what the description of the printable form will look like for the user
CommandTable = GetCommandTable();
AddCommand(CommandTable, "Hello World", "Layout", "CallServerMethod", True, "MXL Print");
Registration Parameters.Insert("Commands", CommandTable);
ReturnRegistrationParameters;
EndFunction

Actually, you will have to tinker with it every time you create a new external printing form. From the piece of code it is clear that we will link it to the “Hiring” document, accordingly you write your own. Our printed form will be called “Hello World”, again we’ll change it to our own. Here it would be convenient to write an obvious billboard in the template so that it catches the eye, so as not to forget to correct it later; in my opinion, “Hello world” comes in handy. The version is for yourself, write what you want, it will be displayed in the form of an element in the directory of external processing. The word "SAMPLE" is also visible only in the form of a directory of printed forms. Next, we add a command, here the second parameter is the name of the button, this is what the user will see in the document in the “print” menu item.

This set of three procedures is enough for the processing to be added to the directory of external processing; all this confusing code is service and has nothing to do with the printing algorithm. In fact, the authors of the BSP forced us to program in such a difficult way that if previously you immediately started writing the “Print” function, now when you write processing from scratch, and not according to a sample, you will waste time on the service. Previously, registration parameters were optional and were indicated in the processing layout, now everything looks much more serious. The first impression when I saw this was cool, so many possibilities, everything is unified... but in practice I always create just one command in one processing, and link it to one document. Those. in fact, I need two lines for registration: object name, button name. And here everything is so... well, oh well, it’s not for me to judge.

Step four- no less interesting.

PRINT function?

But no, now it’s not a function, but a procedure.

How can I get the layout back?

Send it to the global print subsystem module function.

Okay

Here is the text of this procedure:

Procedure Print(Array of Objects, Collection of PrintForms, PrintObjects, Output Parameters) Export
If PrintManagement.NeedPrintLayout(CollectionPrintForms, "Layout") Then
Print Management.Output TabularDocumentIntoCollection(CollectionofPrintForms,
"Layout", "Layout",
GenerateTabDocumentSample(Array of Objects, Print Objects));
endIf;
End of Procedure

Now for clarification. The first line of the procedure contains a slightly unclear condition. The fact is that when we call the print procedure, the system passes us a table of values, which indicates what we need to print. In essence, the function ManagePrint.NeedPrintLayout(...) checks for the presence in the table of values ​​of a row in which in the "Name" column there is a row with the name of the layout. In practice, in most cases the thing is useless, because... our processing will be able to generate only one printed form. Those. This condition can be omitted and it will not affect performance.

Next, Print Management. Output TabularDocumentIntoCollection(...) - this is what adds the tabular layout where it is needed, so that it can then be displayed on the screen. If you need to show your spreadsheet document in your own window (not in a standard one), then do not call this procedure, but simply write your code here.

I would also like to add that the Print procedure is performed on the client and, if necessary, you can open a free form here in order to ask the user for additional information necessary for printing.

Next, GenerateTabDocumentSample(...) is a function that we have to write in the processing module and which returns a tabular document. In 100 out of 100 cases it will be server-based, because... we need to get the value of the details from the objects listed in the "Object Array" parameter.

Step five- creating a layout.

Hurray, we'll finally get down to the layout algorithm, data retrieval, etc.

But in our sample we will act prosaically and I won’t even comment here)))

Function GenerateTabDocumentSample(Array of Objects, Print Objects)
tabDoc = New TabularDocument;
layout = GetLayout("Layout");

AreaHeader = Layout.GetArea("Header");
tabDoc.Output(areaHeader);

Return TabDoc;
EndFunction

That's all, thanks for your attention

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

The “Trade Management 11.2” configuration is a configuration on “MANAGED” forms!

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

  • "Accounting 3.0"
  • "Trade Management 11.2"
  • "Salary and personnel management 3.1"
  • "Comprehensive automation 2.0"
  • "Small Firm Management 1.6"
  • "Retail 2.2"
  • and other similar configurations.

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

1 — Menu “Master data and administration” (In other configurations, such as in Enterprise Accounting 3.0, it may be called simply “Administration”). 2 — Select “Printed forms, reports and processing” (see figure below ↓)

3 — Expand the “Reports and Processing” submenu (In other configurations, such as Enterprise Accounting 3.0, there may not be such a submenu, so we immediately move on to the next step). 4 — Check the “Use of additional reports and processing” box. 5 — Go to the section: Additional reports and processing. (see figure below ↓) ()

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

8 — Select the directory in which the processing is located. 9 — 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 printed form we need in the selection window. (see figure below ↓)

If we need to add placement for the added processing (For example, this is a Universal Contract Form from our website and we need the command to print this form to be displayed in some object in which it 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 to connect an external printing form by clicking the “Record and close” button. (see figure below ↓)

That's all! Congratulations! External printing plate is connected! Did we do everything right? Let's check...

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

Now that’s it for sure. We hope that this article was useful to you.