Skip Navigation LinksALVAO 11.2 / Admin guide / Custom modifications and extensions / Asset Management customization / Print report templates / REP print report templates
REP print report templates
You can manage print report templates in Administration - Asset Management - Print report templates. Each template contains several files that define the content and appearance of the resulting print report.
The resulting print reports are generated from the templates as follows:
- After the user selects the objects they want to print in the application's object tree, the application generates a working XML file containing details of the selected objects according to the settings in the REP file.
- The working XML file then undergoes an XSL transformation resulting in an HTML document. This HTML document can use other files in the template, such as CSS files, PNGs, JPGs, etc.
- The content of the HTML document is displayed to the user as a preview of the print report.
- After the user approves the preview, the HTML document is converted to PDF format, in which it can be printed or saved to the document repository.
Rep file
A REP file is a text file that defines an output print report.
The file contains several lines in the format:
Variable=Value
For example:
VERSION=XMLReport1
Variable |
Description |
VERSION |
Specifies the version of the print report format. This variable must be specified on the first line of the REP file and must have the value XMLReport1. |
TYPE |
The value of this variable specifies a special procedure for generating the XML file that is the data source for the print report.
Value |
Description |
Null |
When the default value Null is specified, the XML file will contain only the object (including child objects) that is selected in the object tree when creating the print report. |
Transfer Inner |
Print report of type "transfer report internal". |
Transfer Inner Summary |
Print report of type "transfer protocol internal summary". It can only be used on an object of type User. |
Transfer Outer |
Print report of type "transfer protocol external". |
|
SEQUENCE |
The name of the numeric sequence that will be used to generate the document number of the print report type "Transmission Report".
For example: "Loans".
Note: If the value is blank, the system series "handover protocols" will be used for internal handover protocols. No series is used for external transfer logs. |
HTML |
The name of the HTML file to be used as the default file for displaying the print report. The file name is specified relative to the REP file path. If the HTML file is stored in the same directory as the REP file, you only need to specify the file name. |
FLAGS |
The value can be an empty string (e.g. "FLAGS=") or a comma-separated list of items listed below, e.g. "FLAGS=children,ownprop,inheritedprop". Each list item allows writing some information to the XML file. The list of items is given in the following table:
Item |
Description |
notice |
notes to objects (element <noticelist>),
only records that have not been deleted (hidden) in the object log. |
history |
history of objects (element <historylist>),
only records that have not been deleted (hidden) in the object log. |
children |
Child objects (element <nodelist>) |
responsibility |
New subtrees are generated under objects of type User. They contain objects that have the value of the user object in the property "Responsible for property". |
ownprop |
property (element <prop> in <proplist>) |
inheritedprop |
inherited properties (element <prop> in <proplist>) |
owninfo |
element <own>1</own> for custom properties |
inhritedinfo |
element <iherited>1</inherited> for inherited properties |
specialinfo |
element <special>1</special> for special properties (properties for internal use in remote data collection, etc.) |
|
Example of the contents of the Evidence Card.rep file:
VERSION=XMLReport1
TYPE=Null
HTML=Evidence Card.ht
FLAGS=children,ownprop,inheritedprop,notice
XML file
This chapter describes the structure of the XML file that is used when creating a print report. The image of the object (including child objects)
over which the print report is being created (that is, the object that is selected in the object tree) is written to the file. Which elements are
included in the XML file and which are not depends on the setting of the FLAGS item in the REP file.
XML file format (DTD):
<!ENTITY ONE "1">
<!ELEMENT report (node*)>
<!ELEMENT node (name, icon, proplist?, responsiblefor?, noticelist?, historylist?, nodelist?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT path (#PCDATA)>
<!ELEMENT icon (#PCDATA)>
<!ELEMENT proplist (prop*)>
<!ELEMENT noticelist (notice*)>
<!ELEMENT historylist (history*)>
<!ELEMENT nodelist (node*)>
<!ELEMENT prop (value, kind, own?, inherited?, special?)>
<!ELEMENT value (#PCDATA)>
<!ELEMENT kind (#PCDATA)>
<!ELEMENT own (&ONE;)>
<!ELEMENT inherited (&ONE;)>
<!ELEMENT special (&ONE;)>
<!ELEMENT notice (date, desc, user)>
<!ELEMENT date (#PCDATA)>
<!ELEMENT desc (#PCDATA)>
<!ELEMENT user (#PCDATA)>
<!ELEMENT history (date, desc, user)>
Element meanings:
Element |
Description |
node |
object |
path |
path to an object in the object tree |
prop |
property |
translate="no"notes |
object note |
history |
history record |
nodelist |
list of child objects |
HTML file
The REP file also contains the name of the HTML file of the print report, which, after replacing macros, is displayed in the preview before printing. This file is only used when printing from the AM Console.
The following macros can be used in an HTML file:
Macro |
Description |
%HTMLPATH% |
Absolute path to the HTML file on the hard drive.
For example, if the style.css file is stored in the same directory as the HTML file, the following construct can be used to retrieve it:
<link rel="stylesheet" href="%HTMLPATH%\style.css"> |
%XMLPATH_C% |
Name with the path to the working XML file formatted for use in javascript. |
Did not find what you were looking for? Ask our technical support team.