Basic information
- Printing to a print template is triggered by buttons placed in an edit form or on a browse page.
- Supported print template formats include files "xls", "xlsx", "doc", "docx", "html", "txt", "csv", and "pdf".
- Print templates "xlsx" and "docx" support automatic conversion to "pdf".
Location and Management of Print Templates
- Print templates must be stored in the directory "NETGenium\Templates".
- Files can be copied into this directory directly on the server or via the NET Genium settings dialog on the "Print Templates" tab.
- From this directory, print templates can be selected directly in the properties of the button that triggers printing.
Identifiers and Variables in Print Templates
- Only identifiers of database controls and script variables can be used in print templates.
- Script variables can be populated before printing using a script.
- At the position in the template where values are to be inserted, identifiers of database controls or variable names are used.
- NET Genium opens the print template, searches for all identifier occurrences, and replaces them with the corresponding values.
Printing from an Edit Form
- Inserting values of database controls into a print template from the currently opened record in an edit form uses identifiers in the shortened format "#ng_control#".
Printing from Browse Pages and Tables
- Printing records from a browse table requires the use of identifiers in full form, in the following possible formats:
First Format (Recommended)
- “#DG10#.#ng_control#”, “#DG11#.#ng_control#”, etc.
- Intended and most suitable for datagrids, using notation based on the datagrid ID (JavaScript element name).
- This approach is more stable when additional datagrids are added to a form and their order changes, which would cause identifier changes when using the second format.
- Identifier lookup

Second Format
- “#datagrid1#.#ng_control#”, “#datagrid2#.#ng_control#”, etc.
- This full identifier format, including the visual control type name and its sequence number, reflects scenarios where multiple browse tables with the same data source but different filtering conditions are placed in an edit form or on a browse page.
- Additional examples: ** “#calendar1#.#ng_control#”, “#calendar2#.#ng_control#”, etc. ** “#timetable1#.#ng_control#”, “#timetable2#.#ng_control#”, etc. ** “#planner1#.#ng_control#”, “#planner2#.#ng_control#”, etc.
Third Format
- “#ng_form#.#ng_control#”.
Print Behavior When Using Full Identifiers
- NET Genium detects the use of full identifiers and automatically inserts values of individual records one below another.
- If identifiers are placed next to each other on a single line, the print output is a table where each record occupies one row in the print template.
- If identifiers are placed next to each other on two lines, the print output is a table where each record consists of two lines in the print template.
Specific Printing Scenarios
- Printing from a browse page that contains only a single browse table does not require full identifiers; simplified identifiers are sufficient.
- Printing a statistical browse table with aggregated columns uses column identifiers "c0", "c1", "c2", etc., according to their order in the table header, numbered from zero.
Formatting Values in Print Templates
- Print templates created in Microsoft Word must have identifiers placed in fields of type "MergeField".
- Values in print templates can be formatted using the syntax "#identifier@format#".
Post-Print Events
- After successful generation of a print output, the external function "NETGenium.OnAfterPrint" is automatically executed, allowing modification of the output file name as well as its content or format.
Relation to Other Documentation