Přeskočit na hlavní obsah

REP tiskové šablony reportů

Šablony výpisových výkazů můžete spravovat v Administraci - Správa majetku - Tisknout šablony reportů. Každá šablona obsahuje několik souborů, které definují obsah a vzhled výsledné tiskové zprávy.

Výsledné tiskové zprávy jsou generovány ze šablon takto:

  1. Poté, co uživatel vybere objekty, které chce vytisknout ve stromu aplikace, aplikace vygeneruje pracovní XML soubor obsahující podrobnosti vybraných objektů podle nastavení v REP souboru.
  2. Pracující XML soubor pak prochází transformací XSL a výsledkem je HTML dokument . Tento HTML dokument může použít jiné soubory v šabloně, jako jsou CSS soubory, PNGs, JPG atd.
  3. Obsah HTML dokumentu je uživateli zobrazen jako náhled zprávy .
  4. Poté, co uživatel schválí náhled, je HTML dokument převeden na formát PDF , ve kterém jej lze vytisknout nebo uložit do úložiště dokumentů.

Rep soubor

Soubor REP je textový soubor, který definuje výstup tisku.

Soubor obsahuje několik řádků ve formátu:

Proměnná=Hodnota

Například:

VERSION=XMLReport1

ProměnnáL 343, 22.12.2009, s. 1).
OVĚŘENÍSpecifikuje verzi formátu tištěné zprávy. This variable must be specified on the first line of the REP file and must have the value XMLReport1.
CELKOVÝ OBJEM RIZIKOVĚ VÁŽENÉ EXPOZICE

The value of this variable specifies a special procedure for generating the XML file that is the data source for the print report.

ValueDescription
NullWhen 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 InnerPrint 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 OuterPrint 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:

ItemDescription
noticenotes to objects (element <noticelist>), only records that have not been deleted (hidden) in the object log.
historyhistory of objects (element <historylist>), only records that have not been deleted (hidden) in the object log.
childrenChild objects (element <nodelist>)
responsibilityNew 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".
ownpropproperty (element <prop> in <proplist>)
inheritedpropinherited properties (element <prop> in <proplist>)
owninfoelement <own>1</own> for custom properties
inhritedinfoelement <iherited>1</inherited> for inherited properties
specialinfoelement <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:

ElementDescription
nodeobject
pathpath to an object in the object tree
propproperty
translate="no"notesobject note
historyhistory record
nodelistlist 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:

MacroDescription
%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.