the Internet Windows Android

Adding an external printed form to the database. Adding an external printed form to the base External printed forms ZUP 3.0

This article describes how to connect an external printed form to the 1C database on the configuration example "Trade Management 11.2" configuration

Configuration "Trade Management 11.2" - this is a configuration on "managed" forms!

Our instruction "shows" how to connect an external printed form in the 1c information database with the configuration on "managed" forms namely:

  • "Accounting 3.0"
  • "Trade Management 11.2"
  • "Salary and personnel management 3.1"
  • "Comprehensive automation 2.0"
  • "Management of a small company 1.6"
  • "Retail 2.2"
  • and other similar configurations.

In order to connect an external printed form in 1C We will need to pass 11 steps.

1 - The "NSI and Administration" menu (in other configurations, such as enterprise accounting, 3.0 can be called simply - "Administration"). 2 - Select "Printed Forms, Reports and Processing" (see Fig. Below ↓)

3 - Reveal the "Reports and Processing" submenu (in other configurations, such as in the company's accounting of 3.0, this submenu may not be, so we immediately go to the next action). 4 - We put the "tick" using additional reports and treatments. 5 - Go to section: Additional reports and processing. (See Fig. below ↓) ()

6 - Press the "Create" button. (See Fig. below ↓)

In the new versions of 1C (starting from August 2016), the program has built a mechanism for warning about the danger of using unknown external treatments, which may contain "viruses", in earlier versions of the program warning will not occur! If it occurred, it will be necessary to connect an external printed form. 7 - Press the "Continue" button. (See Fig. below ↓)

8 - Select the directory in which processing is. 9 - Select it (processing you need). 10 - Press the "Open" button. Either instead of actions 9 and 10, you can simply click on the external printed form you need in the selection window. (See Fig. below ↓)

If we need to add placement for the processing (for example, this is a universal form of a contract from our site and we need that this form command is displayed in some object in which it is originally not displayed) - 11 - Press the placement line ("place in:", maybe "placement:") and choose the necessary reference books and documents. 12 - Complete steps to connect an external printed form by pressing the "Record and Close" button. (See Fig. below ↓)

That's all! Congratulations! The external printed form is connected! And did we do wrong? Check ...

Before recording and closing, we noticed that this external printed form was placed in the document implementation of goods and services, which means that printing opportunities are opening any document of the species: "Implementation of goods and services". Click the "Print" button and see - a window selection window appears, among them are present - 13 - the external printed form connected by us (see Fig. Below ↓)

Now exactly - all. We hope that this article was useful to you.

Question:

Tell me, please, where in 1C ZUP 3. Add bank details of the organization so that they affect the certificates for employees? For example, in Income certificate (arbitrary shape) From reference Staff.

Answer:

Seminar "Lifehaki 1C ZUP 3.1"
Analysis of 15 lifehams according to 1C ZUP 3.1:

Check-list for checking salary calculation in 1C ZUP 3.1
Video - Monthly independent accounting check:

Accrual of salary in 1C ZUP 3.1
Step-by-step instructions for beginners:

The fact is that in 1C ZUP there is no need to store information about the organization's current account. It is not used in any document. Therefore, these information in the program is not made anywhere and in printed form to get it nowhere.

There are two options. Either every time you make this information manually in the formed form, or make this information once in layout printed form (Administration menu section - printed form, reports and processing - layouts of printed forms).

It is more convenient to use the second option.

In the list of layouts, you need to find the layout of the desired printed form (the name of the layout coincides with the name of the form itself) and click the Edit command. In the window that opens, you need to make the necessary corrections and write them down.

After saving the layout, these changes will be displayed every time in the formation of this report on any employee.

To find out the first on new publications, subscribe to updating my blog:

Go to B. Service->Additional reports and processing->Additional external printed forms.

Opened form of a list of reference book with external printed form. In the top menu, click Add. The form of creating an element of the reference book appears.

Press the Open button and select the file with the desired printed form. After that, if necessary, set the necessary name (field the name).

If the printed form contains the autorecistration parameters, the message will pop up on this. Press Yes. If it won't, then you need to specify what document this form will be tied to the document. For this it is necessary to add a string to the table part "Printing Affiliate", where in the "Object Presentation" field select the type of document to which we bind the form . Since in our example it is an act of writing off materials, we choose the requirement-invoice document.

After that, we go to any document requirement-invoice, press printing, and select just added shape.

For BP 3.0, ZUP 3.0, UT 11, ka 2.0, ERP 2.0.

To demonstrate the addition of printed form in the controlled interface, I will show the addition of an external invoice for payment to the document of the same name in the accounting department 3.0.

We go to the appropriate section of the program:


It is necessary that the sign of using external reports and treatments is included, go through the hyperlink to the list of external objects:

In the list that opens, click Create:


In the dialog box, select the desired file:


The card of the external object was filled: in the placement we see the type of object of the base, to which the form will be tied and slightly below its name:


We write and close the form of an external object created.

Now let's go to any document Account for payment to the buyer and bring the print menu:


Good day.

Today I want to tell you how to create external printed forms for the configuration "Salary and Personnel Management 3.0". As you know in ZUP 3.0, a library of plant subsystems is used, which means the processing strencer looks completely different. When I first had a printed form for a BSP in managed forms (then it was UT 11), I was the first thing to go to the ITS disc in order to find detailed documentation there, what export procedures, with what parameters should be in the processing and How it works everything. Here ITs disappointed me a little, because Everything is described, about how the procedures should look like in the document module, and in the external print form the parameters of the "Print" procedure are rearranged by places, so I had to look for information in other sources and pick the subsystem from the inside.

Well, let's start. What we get at the end is quite possible to use as a pattern.

Step one - obvious. Create a new processing. We assign its arbitrary name: "Sample".

Step second. Create a layout. Since we have a test example, then layout I will create the easiest, without a single parameter.

Step Third - The most interesting. Open the object module and start programming. According to the BSP when registering external processing, it (processing) must report that it can, to which objects it is attached, as it is called. To the question that she can processing must return the list of commands - this is the table of values. In our case, the processing is able to output one printed form, so the team will only be alone. To form a table of values, we will define a pair of procedures that will always be the same in all external printing forms:

// Procedure that prepares the structure of the team table

Function getabitomand ()

// Create an empty table of teams and columns in it
Teams \u003d new tables;

// How to look like a description of the printed form for the user
Teams. Coolclocks. Addly ("View", new descriptions ("string"));

// Name of our layout, so that they could distinguish the called command in the processing of printing
Commands. Coolclocks. Addly ("identifier", new descriptions ("string"));

// it is set to how the processing command should cause
// Possible options:
// - Openingform - In this case, the identifier must be specified in the column of the form that the system will have to open
// - Calient Sneakers - Call a client export procedure from the processing form module
// - Tissvertomethod - Call the server export procedure from the processing object module
Teams. Solonks. Add ("use", new descriptions ("string"));

// The next parameter indicates whether it is necessary to show an alert at the start and completion of the processing work. It makes no sense when opening a form
Teams. Coolclocks. Addly ("Displaying", new descriptions ("Boolevo"));

// For a printed form must contain a print stringMXL
Teams. Solonks. Addly ("Modifier", new descriptions ("string"));

Refund;

Endfunction

// Creates a new string in the table

Function Add to Command (Tablekomand, View, Identifier, Usage, Definition: Lay, Modifier \u003d "")
Newcommand \u003d tablekomand. Addly ();
Newcommand. Representation \u003d performance;
Newcommand. Identifier \u003d identifier;
Newcommand. Use \u003d use;
Newcommand. Showing method \u003d showing;
Newcommand. Modifier \u003d modifier;
Endfunction

Function Information Summer Processing () Export
Parametersregistration \u003d new structure;
Massive assumptions \u003d new array;
Massivenowns. Addly ("Document. Diammerrable");
Parametersregistration. Hold ("view", "printed form"); // maybe - the discharge, additional flow, the creative objects ...
Parametersregistration. Enter ("Purpose", Massive Removations);
Paramersion Registration. Enter ("Name", "Hello Mir"); // name under which the processing will be registered in the External Processing Reference
Parametersregistration. Hold ("version", "1.0");
Parameters deregistration. Hold ("Safety", truth);
Paramersion settings. Enter ("Information", "Sample"); // So it will look like a furniture. Forms for the user
Tablekomand \u003d getabitomand ();
Add to hand (tablekomand, "Hello world", "layout", "chapelsteromethod", truth, "printMXL");
Parameters deregistration. Hold ("commands", tablekomand);
Refund of the parameters deregistration;
Endfunction

Actually in it and you will have to pick every time you create a new external printed form. From a piece of code it can be seen that we will tie it to the document "Receive to work", you write your own. We will be called a printed form "hello world," we change again on your own. Here in the template it will be convenient to write a clear Bileberdo that she rushes into the eyes, so as not to forget to fix it later, on my look "hello world" is suitable as it is impossible. The version is for yourself, write what you want, it will be displayed in the form of an element of the reference book of external treatments. The word "sample" is also visible only in the form of the directory of printed forms. Next, add a command, here the button name is transmitted to the second parameters, this is what the user sees in the document in the "Print" menu.

This set of three procedures is enough so that the processing is added to the external processing directory, all this confusing code is service and the print algorithm has no relationship. In fact, the authors of the BSP forced us so difficult to program, if before you immediately proceeded to writing the "Print" function, now when writing processing from scratch, and not according to the sample, you will spend the service time. Previously, the registration parameters were not mandatory and indicated in the processing layout, now everything looks much more serious. The first impression when I saw it is cool, so many opportunities, everything is unified ... and in practice I always create only one team in one workout, and I cling to one document. Those. In fact, I need two rows for registration: object name, button name. And here everything is so ... Well, okay, I do not judge.

Step fourth - no less interesting.

Print function?

But no, now it is not a function, but the procedure.

And how to return the layout?

Send it to the function of the global print subsystem module.

Okay

Here is the text of this procedure:

Procedure Printing (arms, Collection Print forms, Objects, Parameters) Export
If you are controlled. AppointmentMackets (collection of printform, "layout") then
Controls. Equipment of DocumentsTranslate (Collection Printform,
"Layout", "layout",
Formataddumintage (massive objects, objects));
Ended;
Extrudresses

Now the quotations. In the first line of the procedure there is a little incomprehensible condition. The fact is that when calling a print procedure, the system transmits us with the table of values \u200b\u200bin which it is indicated that we need to be printed. Survise the control function. ApplicationMackets (...) Checks the presence in the table of the row values \u200b\u200bin which the lines with the name of the layout in the "Imaging" column. In practice, in most cases, the thing is useless, because Our processing will be able to form only one printed form. Those. This condition can be omitted and will not affect performance.

Next, control. The extension of the DocumentsTranslate (...) - it is just adding a tabular layout where it is necessary to bring it to the screen. If you need to show your tabular document in your window (not in type), then do not call this procedure, but simply write your code here.

I also want to add that the seal procedure is performed on the client and if necessary, you can open an arbitrary form here, in order to ask more information from the user you need to print.

Next, formataddumintage (...) is a function that we have to write in the processing module and which returns a tabular document. 100 out of 100 cases it will be server, because We need to get the value of details from the objects listed in the "arms" parameters.

Pitch fifth - form layout.

Hurray, we will finally proceed to the layout formation algorithm, data obtaining, etc.

But in our sample we will proceed prose and here I will not even comment)))

Function formatadducumline (massive objects, objects)
TABO \u003d New Timber;
mockup \u003d receiving ("layout");

OblastSchap \u003d mockup. Highlife ("hat");
Tabdow.Shvess (Oblast);

Refund;
Endfunction

Here's actually all, thanks for your attention

Consider writing the simplest printed form in 1C 8.1 - 8.2 On the example configuration Accounting company 2.0. Suppose you want to write an external printed form to the document: to display the basic document data, as well as from the table part Products: Nomenclature, price, number and amount.

You can download the resulting example by.

In configurator 1c enterprises 8. Create external processing ( File-\u003e New-\u003e External processing), We ask a name, create a mandatory requisite for the external printed form Link Object with type Document roll.realizationSerovyovSerg..

Creating a printed layout

We add new layout, layout type leave Tabular document. On the layout we create three areas: Cap, Data and Basement. Make it you can highlight the required number of rows and clicking the menu Table-\u003e Names-\u003e Assign Name (Ctrl + Shift + N).

After that, we start to locate the text and parameters in the areas. In the header, remove printed Title, document number and organizationAlso draw the borders of the table caps and write the names of the speakers. When creating a parameter in cell properties, on the layout layout, set the property Filling In value Parameter.

In area Data Create the parameters for the output of the strings of the tabular part ( Nomenclature, price etc.), and in the area Basement For results by quantity and sum.

Programming

Go to the print form object module Actions-\u003e Open object module.

Create an export function to the printed forms there. Printing ().

Function printing () Export Endfunction

In the function, create a variable for tabular documentin which the printed form will be displayed, we get layout and layout area.

TABO \u003d New Timber; Mockup \u003d receiving ("layout"); OblastSapki \u003d mockup. Focus ("Cap"); OblastsData \u003d layout. PREPARD ("DATA"); OblastPodval \u003d layout. Popularity ("basement");

Fill the parameters happers and bring it to tabular document.

OblastSapki. Parameters. Tell-heading \u003d + Link reference. Room; OblastSapki. Parameters. Organization \u003d Link Object. Organization; TABOTS.MIVES (OblastSapki);

To get a table part lines Products Use the request.

Request \u003d new request; Request. Installation parameter ("Reference", Link Object); Request.text \u003d "Select | Implementing servicesServices. | Realizerovarovyovariovari.Summa, | Implementing servicesServices. Price, | Realizerovarovyovyovariovaya | Is | Document. Upennicovarovarovyovyovyvu.Thovarah as implementing the streets of services | Where | ImplementationServices. Link \u003d & Link ";

In the query parameter we transmit propumes Link Objectwhat would indicate in the condition WHEREthat we need the data of only the document from which we derive the printed form. To get a request sample, first perform it, and then select the lines.

Sampling \u003d query. Fill (). Select ();

Next in the cycle fill the parameters of the region Data For each document sampling line and deposit them in tabular document. Also in the cycle, we consider the outcome values number and amount. Fill each parameter separately we will not, but we use the procedure FILLESTENDATIONS (((<Приемник>, <Источник>) of global Contextit copies the properties values <Источника> in properties <Приемника> . Mapping is made by property names. You can read more about this in syntax Assistant 1C Enterprise 8.

Stretchosumma \u003d 0; Totality \u003d 0; While the sample. Next () cycle of filling out (Oblasts. Parameters, sample); STUDOTICALSMA \u003d STUDOGOSUMMA + SELLING.SUMM; ITOMOBOLOGY \u003d ITOMOTICOLITY + sampling. Number; Tauffa. Equipment (Oblast); EndCycle;

Fill and bring the area Basement.

RegionPowel. Parameters. Duty Option \u003d Multi-Oil; OblastPodviv. Parameters. DutyOkosumma \u003d Streaming; Tabdow. Equip (regionPodval);

Return a completed tabular document from the function Printing ().

refund;

If you use one of the typical configurations, then after returning the table document 1C. The print shape itself itself. Also for output, you can use the table document method Show ().

5. Connecting printed form to the document

IN typical configurations 1C 8 To register external printed forms, there is a reference book External processing. To connect in the enterprise mode, go to the menu Service-\u003e Additional reports and processing-\u003e Additional external printed form.

We add a new element of the reference book, load the printed form from the disk and select the type of document.

Now in document Realization of goods and services A new printed form will appear.

Autopictric printed form

In order that when connecting the printed form it is not necessary to choose the type of document manually, you can configure autorgency. To do this, add a new layout and call it Parameters_avatoregistration(just like this) and in his first cell we write Documentation.<Наименование документа> (or Directories.<Наименование справочника> ).

Now when connecting the printed form, we will be asked to take advantage autorgency parameters.