How to set up smartphones and PCs. Informational portal
  • home
  • Reviews
  • 1c how to add an external report. Adding an external report to the database

1c how to add an external report. Adding an external report to the database

In the top menu go to Service->->.

After that, the directory list form will appear. In the top menu, click Add.

The window for adding a new report appears. We press the button Open.

Select the file with the desired report and click Open. After adding the file, if necessary, change the name of the report (the way it will be displayed in the list). Click OK.

As a result, the new report appears in the list.

After that, the report can be used, the addition is completed. To open this report later, also go to Service->Additional reports and processing->Additional External Reports.

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

To add an external report in 1C:Enterprise 8.3 configurations in the managed interface (for example, Accounting 3.0), we will enter the corresponding section of the program:


It is necessary that the sign of using additional reports be enabled, follow the hyperlink:

In the list that opens, click the button Create:


After that, a dialog box for selecting a file with a report will immediately open, in which you need to select the desired file (in my case, this is a file with a plan-fact analysis of costs).

Now you need to set up accommodation(the place in the program where the report will be available):


Randomly select the desired section of the program from the list:


Now you need to record changes in the external report card:

Now open the report from the program interface:


The list is empty, click here Customize list:


In the selection form, we tick our report:


Now it has appeared in the list:


By button Run the report form opens:


Of course, 1C Accounting 8 has very broad capabilities. With this program, you can perform many different tasks. But sometimes the standard built-in tools are not enough. What to do in this case?

Also, be sure to read a similar article, an article that explains what processing is. Here we will talk about expanding the standard functionality of the program.

Let's say you need to perform some operation and you start looking for how to do it in standard configuration 1C Accounting. Depending on whether what exactly what you want to do, there are several ways to solve the problem.

Method one. Non-standard use of standard program tools. As a rule, this applies to documents. For example, it is required that the document as a result generate such and such postings. Then you need to find a document that is similar in meaning and fill it out accordingly, even if at first glance this 1C document is not intended for this at all.

If the document generates postings close to what you need, but still not exactly the same, you can post the document and then correct the postings manually. I won’t dwell on the features of the non-standard use of ordinary documents here - this is included in my course on 1C Accounting 8. The most important thing is to show a little creativity and knowledge of the configuration, and then it turns out that the range of tasks that can be performed using the standard (unchanged) configuration of 1C Enterprise Accounting will expand.

Another way lies in configuration modifications. For example, one of my students once told me - I want to have a button in a prominent place in my program "How much money do we have?" ". Quite a justified desire, however! ( although there is already such a report in the program)

Nevertheless, despite the ability to modify 1C Accounting at our discretion, we will not consider this option, since this is the business of 1C programmers. So what is left for an ordinary user in this case?

There was an important part of the article, but without JavaScript it is not visible!

The answer is very simple - to expand the functionality of the program using . In particular, we will talk about external reports and processing.

This is done quite simply. We find the required report on the Internet (or processing - depending on what is required) and connect it to the standard configuration of 1C Accounting 8. For 1C Accounting 8.2, go to the menu "File / Open...", or press the button Open on the toolbar, and then in the Explorer window that opens, specify the external report / processing file. An example is in the figure below.


"And how to connect an external report / processing in version 1C Accounting 8.3?"- the owners of the new version of 1C Enterprise will ask. Almost the same. I remind you once again that the difference is only in the interface. An example for 1C Accounting 8.3, see below.

website_

As you can see from the examples above, external reports and processing are connected in the same way as regular files are opened in any other program.

After selecting the file, an external report / processing will open and you can use them as if they were built into the 1C Accounting configuration. It is also worth noting that you must have the necessary access rights to the database.

Tip: store the external reports and processing you use in a specially created folder- it's comfortable. The folder can be created in the folder with the 1C Accounting database (if you have a file database); For convenience, you can change the icon of the folder.

Why are they called "external"?

Because when connected, an external file is opened that has nothing to do with the 1C Accounting configuration. The file itself not embedded in the configuration, but only gets access to the database data.

Security when working with plug-ins

If reports are only read your base, but do nothing with them, then here is the processing may. Of course, it all depends on what kind of processing it is and for what purposes it is intended. In any case, we can recommend the following.

Download external processing only from trusted sources! Remember - database corruption as a result of an error or intentional actions of the processing author can lead to serious problems. If in doubt, make a backup copy of the database before starting processing that you have not personally tested!

Application objects designed to obtain all kinds of pivot tables, to organize data in a form convenient for analysis and viewing in 1C configurations are usually called reports. How to add a report in 1C, various options for adding, we will try to cover these and some other questions in this article.

Reports and Processing: Differences

At the same time, they are distinguished from other similar objects - processings:

  1. Possibility of using ACS (data linking system);
  2. With the help of processing, you can enter information, the report is used to display and organize data;
  3. The difference is in the file format: the epf extension indicates that we are dealing with processing, erf is typical for external reports.

From the programmer's point of view, the use of these objects is very convenient, because it does not require changes to the configuration metadata, and, therefore, there is no need to kick users out of the database to update it.

Ways to add a report to the database

With the help of a special guide

In most configurations provided by 1C, there is an "External Processing" directory that allows you to save processing in the database without making changes to the metadata. There are two ways to access this guide:

  1. For the Full and Administrative interfaces, by going to: Operations->References->External Processing;
  2. All others through: Service->Additional reports and processing.
  3. Next, you need to select the type of form that you want to receive.

So, how to add a layout to the directory through the form, the view of which is shown in Fig. 1

Fig.1 Report or processing registration form

First of all, it is necessary to come up with an original name for the reference element, which would maximally reflect the essence of the generated table. The second step is to select the type of the added form. It could be:

  1. A printable called by the Print button or another button in those objects that are specified in the tabular section "Printing form accessory";
  2. Filling in the tabular parts, for the tabular parts of documents and directories presented in the Tabular part “Accessibility of processing for filling in the tabular parts”;
  3. Treatment;
  4. Report.

Rice. 2 Report type selection field

At the final stage, you need to select a file containing the processed code from those that are saved on disk.

Fig.3 An inscription indicating the need to select a report file

When you write an element, you store it in the database. When restoring and migrating the database, items saved in this way will also be migrated.

Adding to configuration

The steps below require exclusive access to the database.

Having entered the configurator and opened the configuration, you can start adding processing.

If the configuration is closed for editing, you need to go to the menu item Configuration->Support->Setup support. A window will open, as in Fig.4

Rice. 4 Support editing window

  1. Press the button "Enable the ability to change";
  2. Answer the question positively.

Thus, you will be able to add your own elements to the database metadata.

Now, by right-clicking on the “Reports” line of the configuration tree, you can add an external data composer to the configuration Fig.5.

Rice. 5 Submenu for adding a report to the configuration

Features of placing processing on managed forms

An interface built on managed forms imposes its own restrictions on the display of additional handlers added to the base.

Before adding a report to a managed form in 1C, you need to make sure that it was created using ACS, otherwise the form will not be displayed correctly.

Having opened the program in the Administration mode, you need to find the item "Print forms, reports and processing" in the Navigation Panel

Rice. 6 Navigation bar 1C 8.3

By checking the "Additional reports and processing" checkbox in the window that opens, you will be able to add your developments for the managed form to the database.

On the form, click the "Create" button. After ignoring the warning window, you can proceed to select a file.

Very often in the latest versions of the program, the add-on crashes with an error stating that: "Object method not found." The fact is that after creating a handler using the data composition system, it is necessary to register the ExternalProcessing Details() function with the Export mark in its module, this function must return the registration parameters:

  1. The object to which the handler will be connected;
  2. The name with which it will be registered in the database;
  3. Team name.

After that, you can start placing the report in the interface. To do this, click on the "Place" command.

Rice. 7 Accommodation

In this case, the activity of the element is regulated by selecting the appropriate value in the "Publication" field.

Adding without placement

Rewriting the directory element every time any changes are made to the code, especially registering this handler in the configuration, is quite a chore. You can do without it. It is enough to simply open the file containing the processing through the File->Open File menu. The most recently opened objects are stored as a list at the bottom of the File submenu.

Regulated reports

In addition to external files and handlers provided for by the configuration, there is another type of report in 1C - regulated. These are the data layouts, the work with which is regulated by the tax authorities.

By the nature of the work, these forms are more like a document. The validity period of such handlers rarely exceeds one quarter; 1C releases updates to them regularly.

You can open them from the Reports->Regulated reports menu. After selecting a report option, the program will fill it with data from the database. If there is not enough data, the program will offer to add the missing data manually.

Incompletely completed forms are saved with the possibility of completion. A fully completed and verified document can be printed on paper or submitted to the tax office electronically.

They say that the name 1C originally meant the phrase "one second", i.e. programs should produce reports quickly, "in one second". The speed of the reports is very important, but it is even more important that the reports give the correct information - we will deal with this using the example of creating a simple report in 1C 8.3 based on the Trade Management 10.3 configuration. To create correct reports, it is desirable (even highly recommended) to be able to configure 1C and be able to program a little in the internal language and query language of 1C, although, on the other hand, creating reports is a great opportunity to start mastering these skills.

This description is educational for understanding the basic principles of creating reports 1C

How to create a report in 1C 8.3

To create a report, you need to open 1C in the configurator mode, for this, in the 1C launch window, select the desired database in the list and click the Configurator button:

In the configurator itself, go to the File menu and select the New item:


In the menu that appears, select the External report item and press the OK button:


This will open a new report window. In the Name field, enter the name of the report, it must be without spaces and special characters:


How to make a report using a layout

This method most of all requires programming skills in 1C, but here we will not analyze the mechanisms for receiving and processing data, we will make a simple report in order to understand the mechanism for launching the report and displaying the report form on the screen:

In the report window (which opens when creating a report), in the lower list, place the cursor on the Layouts item and, when you right-click, click Add in the menu that appears:


In the layout constructor that opens, you can specify the name of the layout, the Spreadsheet document should be selected as the layout type, and then click the Finish button in the constructor:


This will open a layout window that resembles an Excel sheet:


In this layout, you need to create areas - groups of rows or columns that the program will use as templates, substitute data received from the database into them and display these templates on the screen, thereby putting the report together from these parts.

Let's make a report that displays a list of nomenclature. To do this, we will create two layout areas: a report header and an item line.

To create a header area, left-click on the line header (where the line number is indicated) to select the line like this (the entire line should be selected with one click on the header):


After that, go to the Table menu of the main menu, go to the Names submenu and click on the Assign name item:


The program will prompt you to specify the Name of the area, the name also should not contain spaces and special characters, after that click OK, it should turn out like this:


Now in the created area you need to enter the text that will be displayed in the report and format it. To do this, enter the text in the first cell, for example, "List of nomenclature." Working with cells is similar to Excel.

To format the text in a cell, right-click the cell and click Properties. The cell properties window will open on the right. Scrolling down the contents of the window, find the Font field and click on the "..." button:


In the window that opens, in the Style section, check the Bold checkbox and click the OK button:


The layout should look like this:


In the same way, we create the area of ​​​​the line of the nomenclature, but do not highlight it in bold:


In the line area, you need to indicate that the Name is a parameter, i.e. that the real name of the nomenclature will be substituted there when the report is displayed. To do this, open the properties of the cell with the name and in the properties in the Fill field, select the Parameter value, this completes the layout setup:


We return to the main report window and right-click on the Forms item in the lower list and click Add:


In the report form designer that opens, click the Finish button, the report form will open, double-click the Generate button:


As a result, the button properties window will open on the right side of the screen, in the Action field, click on the magnifying glass:


After that, the form module will open, in which you need to program the report generation:


First, insert the following text of the program code instead of the selected text:

//create a spreadsheet document that will be filled with parts of the report and displayed on the screen
TabDocument = New SpreadsheetDocument;
//next, get the layout that was created when creating the report
Layout = GetLayout("Layout");
// now you need to display the report header, for this we get the header area from the layout and display it in a spreadsheet document
AreaHat = Layout.GetArea("Hat");
TabDocument.Output(RegionHeader);
//using a query, we get a selection of item names that need to be displayed in the report
Request = New Request;
Request.Text = "
|CHOOSE
| Name
| FROM
| Directory.Nomenclature
|";
// get the item line area from the layout - we will refer to it in a loop to display each item
AreaString = Layout.GetRegion("String");
//we process each name from the received selection in a loop
Selection = Query.Execute().Select();
While Selection.Next() Loop
//to display the next line, you need to specify the next name in the area parameter (we configured the parameter itself when creating the layout)
ScopeString.Parameters.Name = Selection.Name;
//parameter filled in, now you can output a string
TabDocument.Output(AreaString);
EndCycle;
//spreadsheet document is formed, now we display it on the screen
TabDocument.Show("List of nomenclature");

When the text is copied into the form module, the lines starting with a double slash "//" will be highlighted in green - these are comments, they describe what each line of code does:


Let's summarize what lines of program code are needed to generate a report:

  1. It is necessary to create a spreadsheet document that will be filled with parts of the report and displayed on the screen, this is done with the line “TabDocument = New SpreadsheetDocument;”
  2. We need to get the layout of the report, from which we will get the structure of the report in parts (areas), this is done by the line "Layout = GetLayout("Layout")"
  3. To display each of the areas, you need to get it from the layout and output it to a spreadsheet document, this is done with the lines "AreaHat = Layout.GetArea("Hat")" and "TabDocument.Output(AreaHat)"
  4. If you need to fill in parameters that become known only when the program is executed, then before displaying the area, you need to fill in such parameters, this is done with the line "AreaString.Parameters.Name = Selection.Name"
  5. And only when the spreadsheet document is filled with all the necessary parts of the report, it is displayed on the screen, this is done with the line "TabDocument.Show("Nomenclature list")"

And now you can check the operation of the report - open 1C in enterprise mode (button 1C: Enterprise in the 1C launch window). In the main menu, go to the file menu, click Open:


Find and open the saved report file. In the form that opens, click the Generate button:


and get a list of nomenclature:


This is just one of the ways to create reports in 1C. We will explore others in future articles.

Login as a student

1C 8.3 data composition system for beginners: first report on SKD

If you have not read the introduction to this module, please read it: .

To complete the lessons you will need 1C 8.3 (not lower than 8.3.13.1644 ) .

If you already have 1C version 8.3 installed, use it. If not, download and install the educational version, which 1C releases specifically for educational purposes: .

A shortcut like this should appear on your desktop:

For all the lessons from this cycle, we will use the database "Gastronom" prepared by me. It completely coincides with the base that we used in the modules of the school when studying queries. Therefore, I expect you to be familiar with its manuals and documents.

If you deleted it, download it again using the next one, unpack it and add it to the list of databases.

Finally, the workplace is set up and now we will create our first report together using the data composition system. It will be very simple to demonstrate the general capabilities of the data composition system (abbreviated SKD).

We set a goal

Purpose of this lesson- create a report that, in user mode, displays a list of clients with the following fields:

  • Name
  • Floor
  • Client's favorite color.

The report must be external. This means that it will be created and configured in the configurator, and then saved as a separate (external) file on the computer.

To generate such a report in 1C, the user will need to run the database in user mode, open this file and click the "Generate" button.

Go!

Create a report

Run the configurator for the "Gastronom" database:

From the main menu, select "File"->"New...":

Select "External Report":

Create a data layout scheme inside a report

The window for creating an external report opens. Enter as the name: " Lesson 1"and then press the button" Open Data Composition Diagram":

The Schematic Creation Builder has started. Accept the default name " MainData Layout Schema"and press the button" Ready":

The main working window has opened, with many tabs and fields, in which we will configure our data composition scheme.

There is no need to be afraid - there are really a lot of opportunities here, but we do not need all of them. Especially in the first lesson.

Now we are on the tab " Datasets". We will remain on it.

Writing a query through the constructor

The Data Composition System (ACS for short) requires us to data, which it will display to the user.

The easiest way - write a request to the base. In schools, we learned how to write and understand requests - so I expect you to have the appropriate skills.

Click on green plus sign and in the drop-down list, select the item " Add Dataset - Query":

Our task is to write the request text in this field. Have you forgotten how to do it yet?

I'll prompt you:

In this query, we have selected three fields (" Name", "Floor" and " Favorite color") from table " Directory.Clients".

But do not rush to write this text in the "Request" field manually.

Now we will create the same query visually, only with the help of the mouse. This method is called Request constructor".

To call this constructor, press the button " Request constructor..." in the upper right part of the "Request" field:

In the window that opens, drag the table " Clients" from the first column to the second to indicate that it is from this table that we will query the data:

It turned out like this:

Next, let's expand the table Clients" in the second column by sign " A plus" to see all its fields and drag the field " Name" from the second column to the third to indicate that we need to query the "Name" field from this table:

It turned out like this:

Let's do the same with the fields " Floor" and " Favorite color". The result will be like this:

Click the "OK" button to exit the query builder and see that the query text is automatically added to the "Query" field.

Moreover, based on the text of the request, 1C itself pulled out the names of the fields (the area above the request) that will be used by the data composition scheme:

Now that we have made a request, the ACS knows how to get the data for the report.

Setting up the data view

Somehow left visualize this data for the user in the form of a printed form. And this is where SKD can work wonders!

To create such a miracle, go to the tab " Settings" and press the settings constructor button ( Magic wand):

In the window that opens, specify the type of report " List" and press " Further":

In the next window, select (by dragging and dropping) the fields that will need to be displayed in the list (we will drag and drop all of the available fields: " Favorite color", "Name" and " Floor"):

We get the following result and press the button " OK":

The settings constructor closed and the item " Detail records":

The report is ready, let's check it. To do this, first save the report as an external file.

Saving the report as a file

Open the main menu item File"->"Save":

I will save it to my desktop as " Lesson 1":

Checking the report in user mode

Finally, close the configurator and enter our database in user mode:

Username "Administrator", no password:

Through the menu, select the item " File"->"Open...":

And specify the report file (I saved it to the desktop under the name "Lesson1.erf":

The report form opens, press the button " Form":

Ready! Here is our printable with a list of clients, their favorite color and gender:

The printed form can be easily printed. To do this, just select the menu item " File"->"Seal...":

Just like that, without programming, we managed to create a full-fledged report that users can open in their databases, generate and print.

students - I answer by mail, but first take a look at.

Login as a student

Sign in as a student to access school content

Top Related Articles