The workstation printers print receipts, reports and other printed documents. The layouts according to which the documents are printed can be changed in a special editor.

The editor is called from the Layout property in the Documents and Layouts directory. Document layouts are used to set the visual presentation of a document on paper. A layout consists of pages, bands (sections) are placed on the pages, and other bands or memo fields are nested in bands. The properties of pages, bands, and memo fields are changed through the object inspector. The sizes of bands and fields are changed by dragging their borders.

A band can correspond to a data source (dataset), which is a set of records. Memo fields are used to display individual fields of the data source or any text. The names of the data source fields are enclosed in square brackets.

To place a band on the layout, use the Create Band operation and draw a band area starting from the upper left corner to the lower right corner, holding down the left mouse button. The cursor will look like this: .
To place a memo field in a section, use the Create Memo operation and outline the memo field area, also starting from the upper left corner to the lower right without releasing the left mouse button. The cursor will look like this: .


For example, there is a data source Dishes. In order to reflect it, we add a section to the report, in which we enter the value Dishes in the DataSetName property. Then we place memo fields in the bndDishes section in order to print individual fields of the data source.

On the left are the DishName and Quantity properties of our data source. Below is a "view" of the document layout.


You can select the operations for creating a band and a memo field:

If the band was created using the pop-up menu commands or toolbar buttons, you will be prompted to select a band type.



Report Title – displayed once at the beginning of the report;
Report Summary – output of summary data for the page;
Header – appears at the beginning of each page;
Footer – appears at the end of each page;
A virtual band is a section that can be used to create and display any calculated results based on multiple data sources, or simply various text data.

Each band associated with a dataset has a header, body, and footer. The body is output as many times as there are records in the data source. The Report Header and Report Title bands have only a header area. The Report Footer and Report Total bands have only a footer area.
If a field placed in the band body is not in the data source, the message "Error!" is displayed. The band data source is not available in the band header and footer. They may contain text memo fields or fields from other data sources.
When you click the button ("View"), the document is displayed on the screen in the form in which it can be printed on paper if you save the layout now. Filling with test data occurs randomly from the reference database.

Example. Place bands with the data sources "Dishes" and "Modifiers" on the document layout. Place the memo fields "Name" and "Quantity" in the body of the "Dishes" band. Place the memo fields "Dish" and "Modifier" in the body of the Modifiers band, and the dividing lines in the header and footer. 


Now, for comparison, let's place the "Modifiers" band inside the "Dishes" band.

We see that for dishes from the “Dishes” data source, for which there are modifiers in the “Modifiers” data source, the data of the “Modifiers” band is displayed.
To change the band's data source or select it, double-click the left mouse button in the band area or click the button in the band's Data Source property. A window will be displayed on the screen with a list of data sources available for this layout.
This window opens when you double-click the left mouse button in the band area or when filling in the band property DataSetName. When you double-click the left mouse button on the field, the Content Editing window opens. The text is edited in the upper part of the window, and the script is edited in the lower part.

Using the button or by right-clicking in this window, the Attributes window opens, where you can select to add a field attribute.
The All data sources flag allows you to change the output mode of data sources: only the data source of the band to which the memo field belongs or all available data sources.
You can edit a selected band (or a selected field) using the pop-up menu commands or by defining property values ​​on the Properties page.

A new layout page can be added using the Insert command from the pop-up menu called from the page title output area at the bottom of the editor window or by pressing the key combination Shift + Ctrl + N.
Using the System names flag, you can change the output mode for the names of data sources and variables in memo fields: system names or in the user language.

Document Layout Editor 
Assistant Page


The editor is used to create a layout for printing documents. The left area of the window contains the document layout. On the Assistant page, use the toolbar to select the desired display mode: Field List, Data Source List, Global Variable List, or Show All.

List of data sources – outputs only data sources on the Assistant page;
Field list – outputs a list of fields for the band selected in the layout;
Global variables list – outputs a list of global variables;
Show all – outputs all data sources and fields of the selected band.
The Properties page lists the properties of the highlighted layout element.
When selecting a section in the layout, the names of attributes from the corresponding table are displayed in green font on the Assistant page, which can be placed in the section area.
The following buttons are displayed on the editor toolbar:
 - import layout;
 - export layout to file with extension .mak;
 - viewing the layout text (preset test values ​​are used to fill in the fields);
 - enable/disable section operation mode;
 - create a memo;
 - create a band;
 - choosing the alignment method;

Document Layout Editor
Properties Page


On this page you can see the properties of the Band selected on the layout or the properties of the selected Memo.

Document Page Properties:
Group Appearance
Visible – print the page. If the flag is not set – do not print the page;
Group Layout
Fixed Height – page height in lines. For slip printing, on printers with roller paper feed, a cut is made;
Height – the height of the document page;
Group Data
Variables – a list of internal variables (global), available to all page scripts;
Parameters – filled in only for cash reports. List of parameters;
Joins – an editor for adding table joins;
Group Behavior
New Page – forced start of a new page;


Slip – if this flag is not set, then all printing is done in a row – on a roller. If this flag is set, then the cash register server automatically checks whether the printer supports slip - printing. If it does, then printing is considered page-based, the page sizes specified in the Fixed Height property are used. In this case, a reminder question "Insert a page" will be automatically displayed.
Group Miscellaneous
Title – the title of the page. Entered in Latin letters;
Script – a script to be executed before printing the page;
Tag – a number associated with an object. Can be used in scripts.
Band Properties:


Group Data
Category – section category;
Data Source – the source of section data;
Filter – editor for creating a filter;
Calculated fields – area for adding calculated fields;


Sorting order – select fields for sorting;



Grouping – select fields for grouping.




Group Appearance
Body, Header, Footer – the size of the area in the number of lines. The description of these band areas has the same set of sub-properties:
Colorful – color printing mode.
Double Height – print height;
Double Width – print width;
Hide Blank Lines – a printing option that allows you to hide blank lines from being printed;
Size – number of lines – size of the area.
Group Position
Height – number of lines – band size;
Top – the number of lines from the top edge of the layout.
Group Behavior
Show Empty – a flag that specifies whether the band should be displayed if the data source associated with the band does not contain any records.
Group Miscellaneous
Name – name of the band;
Before Start – scripts executed before the band starts printing;
After Completion – scripts executed after the band has finished printing;
Script – executed before printing each row of the data source;
Tag – a number associated with an object.
Child XML Tag
Memo–XML attributes
XML Section



Memo Properties:
Group Layout
Alignment – alignment of the field;
Height – number of lines – field height;
Width – number of characters – field width;
Left – the number of characters from the left edge of the band to the left border of the field;
Top – the number of lines from the top edge of the band to the top border of the field.
Group Data
Contents – field contents – displays the number of lines occupied for viewing.

Group Appearance
Format – field format – select from the list: “Date”, “Date Time”, “Time”, “Unsigned”;
Hide Zeros – a printing option that allows you to hide zero values from being printed;
Visible – print the field if the flag is set, do not print the field if the flag is not set;
Word wrap – flag – word wrap is allowed;
Alternative language – flag – print with choice of character set of alternative language.
Group Miscellaneous
Name – name of the field;
Script – the point for dragging the image borders is marked with the number 1. The size in pixels is displayed next to the window name.
The color of the left mouse button when working with an image is indicated by the number 2, the background color (right mouse button) is indicated by the number 3;
Tag is a number associated with an object;
XML Attributes
XML class
XML tag.