Designing a template consists of "drawing" blocks that will be used to "assemble" the resulting document or report. Since nearly all the business documents have a rectangular structure, it is best to create templates for these documents in an editor that supports rectangular elements.
1C:Enterprise spreadsheet editor fits this requirement. You can enter text into spreadsheet cells, specify text and cell formatting, adjust spreadsheet row height and column width, and insert drawings (lines, rectangles, pictures, OLE objects, charts, and other graphical objects). You can also customize the appearance for the entire spreadsheet or for individual cells or cell groups.
In its final form a template is a combination of rectangular areas, each area representing some document or report part: a title area (used to display name, dates, and other data), a header area, a table area, and other areas.
Fig. 262. A template in a spreadsheet document
You can assign a unique name to each rectangular area of a template so that you can refer to it later on.
Building a report based on a template goes as follows. First, a document or a report is created as an empty spreadsheet. Note that a template is not directly linked to the final report. A template is a set of building blocks turned into a report using 1C:Enterprise script tools.
When a report is being generated out of a template, area names are taken in the required order, translated (variable names are replaced with their values), and copied to the report. The report generation script supports the expansion of reports both horizontally and vertically.
Another way of report generation is entering data in spreadsheet document cells. Then the application processes this data using a formula given in the spreadsheet document. The results appear in other spreadsheet document cells and the report is ready to be viewed and printed.
Next page: Specifying print settings