the Internet Windows Android

Change the account template in 1C 8.2. Publications

In 1C: Accounting 8.3 (edition 3.0) there was a wonderful opportunity. Now the user in 1C mode: enterprises can completely calmly edit the layouts of printed forms.

When can it be useful? Well, for example, there is some printed form, say, "requirement-invoice" in which you every time after the printing it is put on the seal. Change the font, pretend to the fields, clean up too much.

So why do it do every time?! If we can make these changes on the layout once printed form And the program will always display a printed form as we need.

Below in steps, I will show how to change the print layout of the "requirement-overhead". We will add a new field there: "Responsible".

1. Form the printed form (on the "Print" button) and press the button (on the right) "-\u003e" change the layout "in the form):

2. The printed form layout opens. Make the necessary changes to it, but be careful. I will say right away that the fonts and dimensions of the fields can be changed completely accurately, but to remove existing fields (especially those in<угловых скобках>) Not worth it. If you want to hide the field in<угловых скобках>, Just make it invisible (color or size), but it should remain on the form, as it is required by the 1c program code.

3. We will add the "Responsible" field and click the "Record and Close" button.

4. The printed form was re-formed in a new form as we wanted.

If, after changing the printed form, it stopped working, then you need to return the layout of the printed form, how to do this in the next articles.

2016-12-01T12: 56: 42 + 00: 00

In 1C: Accounting 8.3 (edition 3.0) there was a wonderful opportunity. Now the user in 1C mode: enterprises can completely calmly edit the layouts of printed forms.

When can it be useful? Well, for example, there is some printed form, say, "requirement-invoice" in which you every time after the printing it is put on the seal. Change the font, pretend to the fields, clean up too much.

So why do it do every time?! If we can submit these changes to the printed form layout and the program will always display the printed form as we need.

Below in steps, I will show how to change the print layout of the "requirement-overhead". We will add a new field there: "Responsible".

1. Form the printed form (on the "Print" button) and press the button (on the right) "-\u003e" change the layout "in the form):

2. The printed form layout opens. Make the necessary changes to it, but be careful that it does not work. I will say right away that the fonts and dimensions of the fields can be changed completely accurately, but to remove existing fields (especially those in<угловых скобках>) Not worth it. If you want to hide the field in<угловых скобках>, Just make it invisible (color or size), but it should remain on the form, as it is required by the 1c program code.

3. We will add the "Responsible" field and click the "Record and Close" button.

4. The printed form was re-formed in a new form as we wanted.

If after changing the printed form, it stopped working, then you.

Yours faithfully, Vladimir Milkin (teacher and developer).

This article will be described in detail as a newcomer, poorly knowledgeable 1C 8 to create a printed form. For example, take one of the most common configurations 1C 8 - Accounting 2.0. Creating a printed form 1C Stages of writing:

  • Creating an external printed form file;
  • Creation of a printed form layout;
  • Writing a program code to output printing data on the screen;
  • Creation of printing parameters of the printing form;
  • Connecting an external printed form to the database 1C enterprise.

Creating a printed form 1C. Formulation of the problem

We are required in configuration Accounting 2.0 create a printed form to the document Admission of goods and services. In the print header, withdraw the following data:

  • Organization;
  • Counterparty;
  • Contract contract;
  • Date of receipt.

In the form of a table display the data of the tabular part Productsdocument. The table must include the following columns:

  • Nomenclature;
  • Number;
  • Price;
  • Amount;
  • As well as the price of the nomenclature to the current date (according to the type of prices from the document).

File external processing

Let us turn to the solution of the problem. To begin with, open 1C 8 in mode Configurator. It is in this mode that all development on the 1C 8 platform is carried out. Now we need to create a file external processing. For this click on the menu File -\u003e New ... or by the pictogram of the new file.

In the window that opens, choose the item External treatment.

Next in the field Name It is necessary to enter the name of the external processing. In our case, I will simply call it: "Printform", the field of synonym will be filled automatically. Note that in the field Name,external processing, you should write a name without spaces and punctuation marks.

Add external processing props Link object and choose For him type DOCUMENTS DROVERNIK. BY DUTENIETETOVARYAVSHODSHUG. To do this, in the Metadata Trees of External Processing 1C to highlight the item Requisites And click the button Add (Button with green plus). The propulsit properties window will open on the right side of the screen, in the field Name We offer - Link object. IN field A type Press the button with three dots.

In the Type Tree, we will open the branch Document rolland we will find the element of the admirement of the service there, we put a tick and press it OK.

Save the external processing file on hDD, To do this, use the menu File -\u003e Save, pictogram Save (blue diskette) or key combination Ctrl + S.. We call the saved file "Printform".

Creating a printed layout

We will proceed to creating a layout of the printed form 1C. The layout serves as a template for printing a printed form, so if you want your print form to look good, you should pay attention to it.

In the external processing metadata tree add new layout, in the layout design window, we will not change anything and press the button Ready.

In the new layout that opens, create several areas needed to output printed form. All the layout you need will be horizontal, so to create a new area, select the required number of layout lines and go to the menu Table -\u003e Names -\u003e Assign Name or use key combination Ctrl + SHIFT + N, After that, enter the name of the area in the window. When creating a layout area, do not be afraid to make a mistake with the number of rows you can always add or remove. To remove the 1C layout string, highlight the desired line and select context menu paragraph Delete. For adding new String on the layout, highlight any line of the layout and select the item in the context menu Spread.

Adding a cap layout

First of all create an area CapThe data will be displayed in the printed header. For this area, we will need seven lines of layout. Highlight them and, as I wrote above, press the key combination Ctrl + SHIFT + N, in field Name Write a "cap" and press the button OK.

Fill the layout area you need. Usually no printed form is without a header, so we will create it in our layout cap. Since in the header, in addition to the printed form name, we will also display the document number from which it was printed, the text of the header in the layout we set the parameter. The layout parameter is a specially indicated layout cell, into which, using the built-in 1C 8, you can withdraw various data. The title should be displayed on the entire width of the printed form, so we will define how many layout cells we will be enough for printing on standard landscape orientation Sheet.

Usually grabs thirteen or fourteen cells of the layout, select them in the first line of the region Cap and combine into one cell ( Context menu -\u003e Combine). After that, double-click on the resulting large cell and write the name of the parameter, in our case the "text headband". In order for the text entered by the full parameter, click on the location of the right mouse button and select the item in the context menu Properties. On the tab Layout We find the field Filling And choose the value Parameter. Parameters in layout 1c are designated by brackets "<>».

The printed form header must be allocated among other things, so once again select the cell and with the help of icons on the layout formatting panel, we will put the text alignment CENTER and font size 14.

After the text of the header, we bring to the area Capdata on the organization, counterparty, contract of counterparty and the date of receipt of the goods. Since all this data is also taken from the document, also to form them parameters. In addition, before each parameter, you should send the explanatory text that the user would be easily understood where the organization, and where is the counterparty, etc. All these actions are similar to creating a header therefore I will not stop in detail on them, I will give only a drawing with what should turn out in the end.

The figure shows how the layout parameters differ from the usual text.

Adding a layout table cap

The last thing we need to create in this field layout is a table hat to which tabular data will be displayed. Products. The columns necessary for the table were described in the "Problem Statement" section. The table cap will also create using the combining cells and writing text (column names). Borders of the table caps highlight using the tool Framewhich is located on the layout formatting panel.

Adding a table in layout

Create another area in the layout - Data. It will displays the table data table Products.For this area we will need only one layout line. To display all the rows of the tabular part in the printed form, we will fill and output this area the required number of times. Columns in the region Data Must coincide with the columns of the table caps, so it is not difficult to fill it. The only difference is in the area Data We need parameters, not just text. Also note that the default numeric parameters are formatted along the right edge, and text-to-left. To highlight columns, you also need to use the tool Frame.

Adding basement in layout

The latest domain of the layout area is Basement. It will take out the results in quantity and sum. Creating analogous to the creation of the region DataBut additionally it is necessary to highlight the results of bold font.

As a result, a layout of the following type should turn out:

Creating a printed form 1C. Programming

We will proceed to programming - this is the most important step in creating a printed form. First of all, we turn to the module of an external printed form object, it is there we will be programmed. For this, in the main window of external processing, click Actions -\u003e Open the object module.

In the module of an external printed form object, you must create an export function. Printing ().

Print Feature () Export endfunction

Please note that this feature is mandatory for external printed forms in configurations using normal app. The entire subsequent program code is necessary for the output of the printed form will be writing inside this function.

Initialization of the main variables

Create a variable Tabdowwhich will contain a tabular document - it is it that is a printed form in which we will withdraw the filled layout areas.

TABO \u003d New Timber;

In a variable Layout We obtain the printed form layout we created. To do this, use the built-in function Receive<ИмяМакета>).

Mockup \u003d receiving ("layout");

All layout areas will be obtained in variables. To do this, use the layout method Once upon<ИмяОбласти>) .

OblastSapki \u003d mockup. Focus ("Cap"); OblastsData \u003d layout. PREPARD ("DATA"); OblastPodval \u003d layout. Popularity ("basement");

Pressing the header of the printed form in a tabular document

All necessary variables are initialized. We begin to fill out and output layout areas in a tabular document. First of all, fill the title of the printed form, for this we need to transfer to the parameter TextAgolwhich we created in the layout you need the text. To fill the parameter values \u200b\u200bin the layout area there is a special collection that is called - Parameters.From which through "." You can get any parameter. In the header text, let's give the text: "Print Form", as well as a document number.

Oblastsapki. Parameters. Tell-heading \u003d "Printed Form" + Link Object.

The remaining parameters of the caps are filled in a similar way, all the values \u200b\u200bnecessary for them will be obtained from the requisite Link Objectwhich contains a link to the printed document.

OblastSapki. Parameters. Organization \u003d Link Object. Organization; Oblastsapki. Parameters. Contragent \u003d Link Opportunity. Contractor; Oblasts. Parameters. Data allowance \u003d reference. Data; Oblastsapki. Parameters. CONTRIBUTERTRENT \u003d Link-based object.

All the parameters of the caps are filled, withdraw it in the tabular document we create, for this we use the method Bring out<Область>) .

TABOTS.MIVES (OblastSapki);

Writing a request for printed for

Take filling and output of the region Data. Creating a printed form 1C implies and writing a request, it is necessary for us to get the tabular data Products and prices Nomenclature We will use the current date Inquiry. The 1C 8 query language is similar to SQL, and more precisely practically copies the capabilities of its SELECT statement, but the entire request is written in Russian. Therefore, if you are at least remotely familiar with SQL, then 1C 8 query language will understand easily.

In this print form, the request will be quite simple and many will say that it would be possible to do without it, but knowledge of the query language and the ability to competently use it - one of the main skills of the programmer 1c. Queries allow using smaller resources to receive the most difficult data samples, as well as in the request text, it is much easier to understand than in the program code written without using the query (or with its minimum use). In addition, 1C 8 is very good designer Requests that allow you to collect the request from the desired tables in the interactive mode.

Create a variable that will contain a request.

Request \u003d new request;

The query text will be compiled using the query designer. To begin with, write:

Request.text \u003d "";

We will put the mouse cursor between quotes, press the right mouse button. In the context menu that opens, select the item Request Designer, It will help us very much in creating a printed form 1C. After that, the query constructor window will open, it contains many tabs, but for our request only four are needed: "Tables and Fields", "Communications", "Conditions", "Association / Pseudonyms".

For our request, we will need two tables: a tabular part Products document Admission of goods and services and a cut of the latter on the current date of information Prices Nomenclature.

In the left side of the designer window we will find column Database. It has a tree of all objects of metadata, we find the necessary us. To do this, open the branch Documentation and finding the document Adaitetovarov Supervug, reveal it and find table part Productspulling it into the query designer column Tables. You can drag in three ways: actually dragging, double-clicking on the table or highlighting it and pressing the "\u003e" button. Let's open the branch Registribution and find there a table PricesNacture. PreventiveAlso drag it to the column Tables. These two tables are enough for our request.

Select the fields you need from the received tables. To do this in the column Tables Recall the table and find fields: Nomenclature, amount, price, number and pouring them into the third column column - Field. Recall the table , find the field Price And also pulls him into Field.

The structure of the tables and fields of our request is ready, now we will deal with the conditions. We need the table part to Products We were not taken from all income, but only of the one that we print. To do this, we offer a condition on the table AdaitovyovarovyovServyvaryovas. Let us turn on the "Conditions" tab of the request designer. In a collumn Fieldthere are previously selected tables, we will need a field for the condition Link from the table Promplementovarovarovyovyovyovyov By pulling it out the condition window.

In Q1s, you can use the parameters, they are needed to transmit data to the request. For example, if we want to limit the document sample by some particular document, then you can transfer the link to this document using the parameter and use this parameter to the condition. That is how we will do in our request.

After the window Conditions We added a field Link, the query designer will create a parameter with the same name and will position it after the "\u003d" sign. This parameter can be renamed if there is a desire. In the query text, the parameters are marked with the "&" sign, but in this case it is not necessary to do this, as it is understood that in the second part of the condition there is a parameter, it just needs to be remembered. How to transfer the value to the request parameter 1c will be described below.

Since in the query we use not a complete table price of the nomenclature, but a virtual (bottom cut in this case), then we need to set the conditions for the formation of this virtual table, in our case it is a cutoff date and a condition for the price type (prices have strictly defined The type of price is the one that is specified in the receipt document that we are displayed).

To fill the parameters of the virtual table, we turn to the bookmark Tables and fields query designer in column Tables We highlight the table Prices of priceClampsRext And click the button Virtual Table SettingsLocated at the top. In the window that opens, in the field Period You must specify the parameter to which the date will be transmitted to the price slice. In our case, it will be the current date (that is, today), therefore, the parameter is called "& Current Data". In the Conditions field, we will write conditions for the type of prices, we will also submit it in the parameter that I will call "& Typosts". The resulting condition will look like this (where Typoter - Measurement of the Register Prices Nomenclature):

Typoste \u003d & typotage

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

Now that we have limited the sample only by the document we need, create links between the request tables. If this is not done, then prices from the table price of price averages will not be associated with the nomenclature from the receipt. Let us turn to the tab Communicationrequest designer. Create contact on the field Nomenclature Between the two tables. To do this, press the button. Add, in field Table 1select Table AdaitovyovarovyovServyvaryovas, and in the field Table 2 - priced-lasting. In communication conditions, choose the fields Nomenclature From both tables.

It should also be noted that in the selection of the request, we need to get all the lines from the dashboard Products And prices are only if there are on the current date on the type of document prices. Thus data database Products are mandatory, but there is no price cutting data. Therefore, in relations between these tables, it is necessary to use the so-called left connection, with the left (or mandatory) table will be AdaitovyovarovyovServyvaryovas, and the right (or optional) price of interest. In order for the left connection of the request tables to work as I described above, you must put a tick Everything After the field Table 1.


The request is almost ready, it remains only to work a little over the pseudonyms of the fields. Let us turn on the bookmark Association / Pseudonym and set the alias for the field PricesClaplastureSressext. Price. The name of the pseudonym will be - Pretty year, It is needed in order for the names of the query sample fields and the names of the parameters in the layout of the printed form coincide.

Work in the query designer on this is completed, click the OK button. After the designer window closes you will see that the row with the text of the request is filled and has the following form:

Zapros.Tekst \u003d "SELECT | PostuplenieTovarovUslugTovary.Nomenklatura, | PostuplenieTovarovUslugTovary.Summa, | PostuplenieTovarovUslugTovary.Tsena, | PostuplenieTovarovUslugTovary.Kolichestvo, | TsenyNomenklaturySrezPoslednih.Tsena AS TsenaNaSegodnya | FROM | Dokument.PostuplenieTovarovUslug.Tovary AS PostuplenieTovarovUslugTovary | left join RegistrSvedeniy.TsenyNomenklatury.SrezPoslednih (| & Current Tatt, Tsitsen \u003d & Typoter) as pricesThe Sussert-lasting | According to adhesive leadershipServices. Nomelaclature | \u003d PricesNewsPretextRextRext. NameTraglatura | Where | AdhairsTOVERSWORDS

Request execution

Let us give the necessary parameters to the request, for this we use the request method Installation parameter (<ИмяПараметра>,<Значение>). To obtain the current date, we use the built-in function The current date()She returns the date and time of the computer.

Perform a request to receive a sample with the data you need. To do this, first use the request method Executeand then method Choose().

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

Filling the printed form table

As a result, in a variable Sample A sample of the query results will be contained, you can navigate through it using the method Following(), and to get around the whole cycle will need Until. The design will be as follows:

While the sample. Next () cycle of the endackel;

It is in this cycle that we will fill and output the area of \u200b\u200bthe layout Data. But first initialize two variables of a numerical type. They will collect the results in the number and amount that we need to withdraw Basement.

Stretchosumma \u003d 0; Totality \u003d 0;

Inside the cycle we will fill in the region Data data from the current element of the sample, in variables StudioSummamaand Interpretation add values \u200b\u200bof the amount and quantity, and finally, output the area into a tabular document using the method already familiar to us Bring (). Since the names of the fields of our request completely coincide with the names of the region parameters Data, for filling, we will use the built-in feasibility procedure (<Приемник>, <Источник>) which copies the properties values<Источника> in properties<Приемника>.

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;

Conclusion of printed basement in a tabular document

It remains to fill out and remove the last area of \u200b\u200bthe layout - Basement. We have already prepared data for filling, and we exercise the filling and output.

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

The tabular document is fully filled, it remains to display it on the screen so that the user can see the printed form and printed if necessary. But in typical 1c 8 configurations, the procedures of special modules correspond to the output of external printed forms. Therefore, it is enough to return from the function Printing () Filled table document.

Refund;

At this programming stage, the creation of a printed form 1C is almost completed. Full text function Printing () Here I will not bring, you can watch it in the printed form file, download which can be at the bottom of the article.

Creating a printed form 1C. Autorgency parameters

When the external printed form is connected to the database, the system does not automatically define for which document or reference book is intended for a printed form, it is manually to choose it. And if the other person wrote a printed form, but you only assigned to connect it, then the choice can become ambiguous. In order to avoid such problems, in all external printed forms, it is necessary to create a layout with the autorecraft parameters. If it is created and properly decorated, the system automatically determines which document or reference book is a printed form.

It is done as follows:

  • In external processing, create a new layout. We call it "parameters_avatoregistration" (it is important not to be mistaken!).
  • In the first cell layout write Documentation. (or Directories.) And the name of the document to which you want to connect the printed form.

Connecting to the base of the external printed form

  • Run 1C 8 in mode Company;
  • Go to the menu Service -\u003e Additional reports and processing -\u003e additional external printed forms;
  • Press the button Add;
  • In the window that opens, click Pictograph Replace external file;
  • If you have created the autoregency parameters, we agree to use them;
  • If you have no autorecore parameters, then in the tabular part Printing form add the desired document or directory;
  • Press the button OK.

After that, the external printed form will be available in the menu. Print document Admission of goods and services.Creating a printed form 1C on this can be considered completed.

Today we will tell you how to work with printing forms in 1C.

Now we will analyze the methods of manual editing of the printed form in 1C depending on the versions. In general, if there are no additional complicating factors, the procedure is simple and fast. But here there are subtleties. For example, the actions are simple only when it is necessary to edit the data that will then be printed on the form. In some cases, in order to edit the printed form in 1c, the programmer's help will be required or experienced userFor example, when:

    it is necessary to adjust the location of different elements;

    need to add a few columns;

    you need to change the inscriptions or add the missing.

And now let's make a change in user data in printed form. For example, take any account.

To begin with, open the account log, then select the invoice for the buyer's payment and form the print forms 1C.


As an example, you can edit the amount of the account. Go to editing the printed form you have opened before you. To do this, click on the "View only" button on the panel, which is in the upper corner of the printed sheet.


To proceed to edits, you need to sequentially press the partitions in the menu: Table -\u003e View -\u003e Editing.


Once the prohibition of editing will be removed, you need to click on the data cell twice in which you are going to change the information. Printed form in 1C 8.2 After double clicking the mouse will be available for editing.


The above cases when you need to change the printed form in 1C, are used for one-time edits in printed document. That is, in the future, all these changes will not be saved. If you want to save the changes made, and so that they are present in the future, then for this you need qualifications and certain skills. When you need, for example:

    change the order or name of the columns;

    make edits to field names;

    change the number of fields;

    make additional information and so on.

Instruction

Open the program "1C: Enterprise" version 8. Pay attention to the "Service" menu item - "External processing and printed form". With it, you can store external reports, processing, printed forms, as well as processing to fill table elements. You can also connect foreform Instead of changing the already existing, which entail interference with the configuration of the program.

Run the program "1C: Enterprise" in the configurator mode, then create an external processing, for this, execute the "File" command - "New". In the window that appears, select "External Processing". A new form of external processing will appear on the screen. Assign the name "external". Then add a new props, called the "Object Link", specify the type for it - "Document. Link. Realization of goods and services. " To create a printed form for a different type of document, use the appropriate link type.

Add a new layout by clicking on the appropriate button in the window new form. Assign the name "Layout", create an area named "Title", assign it the "Title Text" parameter. Then click on the "Actions" button, select the Open object module command. Then insert the text of the module, you can use the example posted on the site http://www.uasoft.com.ua/content/articles/315/.

Run the program "1C: Enterprise", go to the "Service" menu, select "External Printed Forms". Put new record in the list of forms. To do this, select the created processing file, and in tabular part, specify the form of the form "Implementation of goods". Check out the correct operation of the new printed form. To do this, open the created document, draw it, then at the bottom of the screen, click the "Print" button, select the "External Printing Form" option.

Sources:

  • as in 1c change the printed form

In order to create and edit object forms, in the program "1C: Enterprise" provides a special form editor (or Form Designer). Forms of applied solutions are designed for visual data presentation while working with the program. The form editor contains several bookmarks that provide the ability to edit all form elements.

You will need

  • computer, program 1c

Instruction

Using the form editor, you can add one or more elements "Group - Pages" to the form, for this, click on the green plusion in the upper left corner of the editor, while on the "Elements" tab.
In "1C: Enterprise" mode, all existing elements of the group will be displayed each on a separate tab. To arrange from above or below the working, in the "Properties" window of a group in the "Display" window, select the appropriate command.

You can also add elements into the form by dragging the desired details into the element tree. For ease of collaboration of the form controls when editing or entering data, set the order suitable for you, placing elements in the tree and subjugate them to other elements, as well as specifying the properties of elements groups according to your needs.
To edit the details of the form - their changes, create new or deletes, use the panel in the area of \u200b\u200bthe props on the appropriate tab.

To edit the command interface, go to the appropriate tab. Before you there will be a tree of teams, the main branches of which is the "navigation panel" and " Command Panel" A part of the commands in the command interface tree is added automatically, however you can also add them yourself, to do this drag the commands you need from the list of global (general) commands or from the list of command commands.

Edit the form commands in the corresponding list. You can add them, delete them from the list, set each command of the property using the properties palette that you can call clicking on the pencil icon in command line List.
To edit form parameters, go to the "Options" tab, where you can also add them, delete and set the desired properties.

Video on the topic

The billing plan used in accounting to display the economic activity of the enterprise, supports a multi-level hierarchy: account - subaccount. To ensure that the user can view the data that is contained in the accounts plan, and adjust them, the 1C system allows you to change the account form. In addition, the printed form of the account is changed can be in any other document in 1C.

You will need

Instruction

For each account, or subaccount provides for analytical accounting. Therefore, when creating and subsequent editing an account plan in 1C, the desired number of subconto can be delivered, that is, objects of analytical accounting. Moreover, adjustments to accounts and subaccounts are made can be as a user working with automated system accounting and software developer.