Control page headers in print layouts

Control page headers in print layouts

The report generator contains the TssPageHeader component, which allows you to view the headers of report pages in the standard Tillypad style.

The print layout header displays:

  • information about the print layout: name of the print layout (report, document, etc.), company details, and selected filter values.

  • service info: current page number, total number of pages, surname of the employee who sent the print layout for printing, and date and time of printing.

  • Tillypad XL logo.

The look of the first page header differs from that of subsequent pages.

Figure 3.213. First page header


The header of the first page contains:

  • Print layout name

  • Company details

    If report data belong to different companies, information about all these companies is displayed.

  • Filter values

    All selected values of all filters are displayed. Each filter value appears in a new row.

The height of the first page header allows all values to be displayed.

Figure 3.214. Subsequent pages header


The headers of subsequent pages display:

  • Print layout name

    A smaller font size is used here than on the first page.

  • Company details

    If report data belong to a single company, only this company’s information will be displayed. If report data belong to different companies, the following message appears: <разные организации> or <different organizations>.

  • Filter values

    All filter values appear in the same row, separated by a comma.

The height of the header on subsequent pages is limited by the service info block height.

TssPageHeader component attributes

  • DifferentOrganizationText indicates the message displayed on the second and subsequent pages of the print layout if its data belong to different companies.

    For Russian print layouts, select the <разные организации> value; for English print layouts, choose the <different organizations> value. Selecting options for print layouts in other languages is not possible.

  • FilterNCaption denotes the filter header.

    This number will be displayed in bold. If values have been specified for multiple filters, the left-hand space that contains all filter values will be customised such that the longest filter header will fit.

  • FilterNDataSet indicates the data set, the filter values from which will be displayed.

    You can select an option from the drop-down list. It includes all available data sets.

  • FilterNFieldName designates the name of the field, the data from which will appear in the print layout header.

    By default, a field appears with a name that ends with _Name. If there are several such fields, you need to determine which field you want to use to display information.

  • FilterNFromCurrentRecord indicates whether to display field values only from the current entry or from all entries.

    Please choose between True and False.

    If False is selected, the header will display all values for the specified field. Selecting True will display only the field value that corresponds with the current entry.

    You should select the value that will display the current entry if you are working with grouped layouts and each group needs a separate report. For example, in print layouts of store documents.

  • OrganizationCurrentRecord indicates whether field values should be displayed only from the current entry.

    Please choose between True and False.

    If False is selected, the header will display the details of all companies with data in the print layout. Selecting True will display only details of the company that belongs to the current entry.

  • OrganizationDataSet denotes the data set containing the details of the company connected to the print layout data.

    You can select an option from the drop-down list. It includes all available data sets.

  • OrganizationFieldName denotes the field with the details of the company connected the print layout data.

  • PageNumeration designates the numbering system for pages in the print layout.

    In this field, you can select pnAbsolutePageNo or pnLogicalPageNo. If pnAbsolutePageNo is selected, the print layout will have a continuous page numbering system. Each page of the print layout will display the number of the current page and the total number of pages. Selecting pnLogicalPageNo will apply the logical numbering system, in which the page numbering starts anew for each group. In this case, each page will display the number of the current page in the group and the total number of pages in this group.

  • PageTextFormat indicates the message format used to display the number of the current page and the total number of pages in the print layout header.

    For Russian print layouts you need to select Страница: %u из %u, for English print layouts - Page: %u from %u. Selecting options for print layouts in other languages is not possible.

  • ReportCaption denotes the print layout header displayed on the first and last pages of the print layout.

  • StretchMode designates the editing mode of the component height, depending on its contents.

    Please select one of the following options: smActualHeight, smDontStretch, or smMaxHeight.

    For the print layout header to display properly, select smMaxHeight.

  • UserDataSet is the data set from which the system will produce the surname and initials of the employee who sent the print layout for printing.

    You can select an option from the drop-down list, which includes all available data sets.

  • UserFieldName is the field from which the system will produce the surname and initials of the employee who sent the print layout for printing.