Customizing a Journaling Template

Scenario: You want to modify the default template, the UL template, or create a user-defined template.

 

Reference: For background information, see the reference section.

 

Workflow diagram:

 

 

Prerequisites:

  • System Manager is in Engineering mode.
  • System Browser is in Management View.

 

Steps:

1 – Open the Journaling Template File

To create a user-defined template make a copy of a default or UL template in the …\profiles\JournalingUsertemplates and rename it, for example as user_defined-template.xml.

  1. In Windows, navigate to the project profiles folder:
    [installation drive:]\[installation folder]\[project]\profiles.
  1. Locate the journaling template file you want to modify at one of the following:
  • Default template:
    …\profiles\DefaultJournalingtemplate.xml
  • UL template:
    …\profiles\JournalingUsertemplates\Journalingtemplate_UL.xml
  • User-defined template:
    …\profiles\JournalingUsertemplates\[user_defined-template.xml]
  1. Open the xml journaling template file with a text editor such as Notepad, or code editor such as Visual Studio.

 

2 – Configure Journaling Paper Type

The default paper type is A4. To specify additional supported paper types, see supported paper types.

  1. In the <PageSetup> section of the template file, navigate to the <PaperDetails> section.
  1. Within the <PaperType> tag, enter the exact paper type (Keyword) as in the Paper Details section. For example, <PaperType>A4</PaperType>.

 

Information

NOTE:
Based on the server printer configured and/or the paper type selected for journaling, you may need to adjust the printer’s default settings as recommended in the printer’s manual.
For printer EPSON 2090, the front and rear tractor settings must be adjusted according to the dimensions of the paper type selected.
For example, for Paper Type = German_Std_Fanfold, you must set the following settings (by changing the default 11 inches) using the EPSON 2090 printer’s control panel default-setting mode.
- Page length for front tractor = 12 inches

- Page length for rear tractor = 12 inches

For more information on how to change printer’s default settings, refer to the Epson LQ_2090 Printer’s User Guide.

 

3 – Configure Journaling Margins and Paper Orientation
  1. In the <PaperDetails> section of the template file, enter the values for top, bottom, left, and right margins within the <TopMargin>, <BottomMargin>, <LeftMargin>, and <RightMargin> tags.
    In the following code snippet, the top and bottom margins are set to 0.5 inches and left and right margins to 0.25 inches.
  1. Enter 0 for portrait or 1 for landscape within the <PaperOrientation> tag. For example, <PaperOrientation>0</PaperOrientation>.
    NOTE: Evenif you set the margins values to 0, <TopMargin>, <BottomMargin>, <LeftMargin>, and <RightMargin>, the printer’s default margin is always be considered while printing.

 

4 – Configure Journaling Fonts

The journaling fonts are applicable only for the page printer.

  1. In the <PaperDetails> section of the template file, enter the font name and size within the <FontName> and <FontSize> tags.
  1. To set the font name and size for the header and footer: enter the font name and size within the <HeaderFooterFontName> and <HeaderFooterFontSize> tags.

 

Information

NOTE:
For printing Asian characters using a page printer, you must select TrueType fonts which support Asian characters, for example, Arial Unicode MS.

 

You can also specify the format (bold, italics, or underline) of the printable text according to the type of generated event (Alarm, Action, or COV) in the <CategorySettings> tag. For example, if you want a bold font with no italics and underline format for all Alarm type events, complete the following steps:

  1. Open the Default or UL template using an editor, such as Notepad or Visual Studio.
  1. Navigate to the <Alarm> tag in the <CategorySettings> section.
  1. In <FontAttributes>, specify 1 for the Bold attribute, and 0 for Italics and Underline attributes.
  • All events of type Alarm are printed with a bold format.

 

 

5 – Configure Journaling Page Headers
  1. In the <PageSetp> section of the template file, navigate to the <PageHeader> section.
  1. (Optional) In <PageHeader>, specify Disable =1” to disable the page header in the print out, and Disable =0” to enable the Page Header in the print out. The default is Disable =0”.
  1. Enter a value, in inches, for the top header margin within the <HeaderMargin> tag.
  1. Specify the text to be displayed in the left header column by entering the value within the <Text> tag in the <HeaderColumn_Left> tag.
  1. Specify the formatting options (Bold, Italics, Underline) for the text by entering either 0 (normal text) or 1 (formatted text) within the <Bold>, <Italics>, or <Underline> tags in the <HeaderColumn_Left> tag.
  1. Repeat steps 2 to 5 to set the text and their corresponding formatting options for the center and right header columns using the <HeaderColumn_Center> and <HeaderColumn_Right> tags respectively.

 

6 – Configure Journaling Page Footers
  1. In the <PageSetp> section of the template file, navigate to the <PageFooter> section.
  1. (Optional) In <PageFooter>, specify Disable =1” to disable the page footer in the print out, and Disable=0” to enable the page footer in the print out. The default is Disable =0”.
  1. Enter a value, in inches, for the footer margin within the <FooterMargin> tag.
  1. Specify the text to be displayed in the left footer column by entering the value within the <Text> tag in the <FooterColumn_Left> tag.
  1. Specify the formatting options (Bold, Italics, Underline) for the text by entering either 0 (normal text) or 1 (formatted text) within the <Bold>, <Italics>, or <Underline> tags in the <FooterColumn_Left> tag.
  1. Repeat steps 2 to 5 to set the text and their corresponding formatting options for the center and right footer columns using the <FooterColumn_Center> and <FooterColumn_Right> tags respectively.

 

7 – Configure Journaling Items Per Page

This is applicable only for page printers.

  1. In the <PageSetp> section of the template file, navigate to the <PaperDetails> section.
  1. Enter the value for the total number of messages to print in the <NumberOfMessages> tag. You can also specify the delimiters for separating the columns and messages by entering the respective characters within the <PropertyDelimiter> and <MessageDelimiter> tags.

 

8 – Configure Journaling Language Settings

You can specify the language in which you want to print the localized equivalent text defined in the textgroups by entering the language id in the <LanguageId> tag. For example, if you want the text to print in French, complete the following step:

  • In the <PageSetp> section of the template file, navigate to the <LanguageId> tag of the template file and enter fr_CA.utf8 within the opening and closing tags.

 

9 – Configure Journaling Printable Columns

You can configure each printable column using the <PrintColumn> tag in the <ColumnsForPrinting> tag.

Each attribute in <PrintColumn> enables you to provide information such as the column name, content, index, alignment, and width.

  1. In the <Columns> section of the template file, navigate to <ColumnsForPrinting> section.
  • (Optional) In <ColumnsForPrinting>, specify DisableColumnHeader =1” to disable the column header in the print out, and DisableColumnHeader =0” to enable the column header in the print out. The default is DisableColumnHeader =0”.
  • (Optional) In <ColumnsForPrinting>, specify PrintOnlyAlertGoneCreated =1” to print all alert state printout except alert gone and alert created in the print out, and PrintOnlyAlertGoneCreated =0” to print all alter state. The default is PrintOnlyAlertGoneCreated =0”.
  • (Optional) In case of line printer, when <PageHeader>, <PageFooter> and <ColumnsForPrinting> are disabled, that is attribute value is = “1” and in <ColumnsForPrinting>, you can specify DisableFormFeed =1” to disable page break in the print out, and DisableFormFeed =0” to enable the page break in the print out. The default is DisableFormFeed =0”.
  1. In the <PrintColumn> section, proceed as follows:
  • Enter the value for the <ColumnHeaderText> tag which is the name of a printable column, for example Event Occurrence Time.
  • The fields to be used in case of Alarms, Actions and COV, must be specified within the <AlarmColumnId>, <ActionColumnId>, or <COVColumnId> tags respectively.
  • To specify the column index, alignment, and width use the <ColumnIndex>, <Alignment>, and <Width> tags respectively. For example, in the template section Event Occurrence Time column is configured to have a column index value as 1 which indicates that this is the first column, is left aligned, and is 1.5 inches wide.
  1. In the <Columns> section of the template file, navigate to the <HistoryFields> section.
  • Depending on the type of event (Alarm, Action, or COV), the information corresponding to the <LogDPEName> tag in the <HistoryField> tag displays.
  • In the History Field_Alarm example, if an event of type Alarm occurs, and you have specified 1001 in <AlarmColumnId>, then the alertTime displays.
  • If an Action type event occurs, and you have specified 2007 in <ActionColumnId>, then the SourceTime displays.
  • If a COV type event occurs, and the value in <COVColumnId> is 3002, then the time at which the change of value occurred displays.

  • In the <Columns> section of the template file, navigate to <ObjectNameColumnOption> and <ObjectPathColumnOption> tags, and type a value to specify the format in which the object name and its source path are printed. The following two code snippets provide the formats for the object name and source path.


In the ObjectPathColumnOption example, the object source path prints along with the Common Naming System (CNS) display name. If you enter 1 as the value, the object source path prints along with the CNS name.
CNS defines how objects are displayed in System Browser. CNS Name is the name of the object and CNS Display Name is the object description.

  • Depending on the type of event generated, the following information can be printed.

Fields for Event Types

Alarm

Value IDs

Action

Value IDs

COV

Value IDs

Alert Time

1001

User Name

2001

Value

3001

Alert Counter

1002

WorkStation

2002

Timestamp

3002

Alert State

1003

SourceDpName

2003

Name of DP (SourceDP)

3003

Alert Transition Time

1004

Action

2004

SourceDP Path

3004

Alert Source DPE

1005

Message

2005

COVDPAlias

3005

Alert Category

1006

Status

2006

 

 

Alert EventId

1007

SourceTime

2007

 

 

Alert Went Message

1008

LogType

2008

 

 

Alert Mode

1009

Value

2009

 

 

Alert Event Cause Message

1010

PreviousValue

2010

 

 

Alert User

1011

SourceDpName2

2011

 

 

Alert Value

1012

Action Source Path

2012

 

 

Alert Event Message

1013

Action Source Path2

2013

 

 

Alert Went

1014

ErrorMessage

2014

 

 

Alert Gone

1015

ActionDPAlias

2015

 

 

Alert Source Path

1016

 

 

 

 

Alert Observer

1017

 

 

 

 

Alert Observer Path

1018

 

 

 

 

AlarmDPAlias

1019

 

 

 

 

Device Text

1020

 

 

 

 

 

Information

NOTE:
If the journaling printout does not contain information from any of the fields that are listed in the Fields for Event Types table, then you must explicitly add a <PrintColumn> section for each of those fields. However, the information related to the AlarmColumnId, ActionColumnId, and COVColumnId for such fields is present in the template in the <HistoryFields> section.

 

10 – Apply the Changes Made to a Journaling Template

In order to apply the configured parameters of the default, UL, and user-defined templates to journaling printouts, you need to complete the following steps:

  • You have made changes in the Journalingtemplate_UL.xml file available in the folder
    [installation drive:]\[installation folder]\[project]\profiles\JournalingUsertemplates or
    the user-defined template file available under
    [installation drive:]\[installation folder]\[project]\profiles\JournalingUsertemplates or
    the DefaultJournalingtemplate.xml file available in the folder
    [installation drive:]\[installation folder]\[project]\profiles.
  1. Select Project > System Settings > Journaling.
  1. In the Journaling Printers tab, select the printer-template mapping to which you want to update the changes.
  1. Click Apply .
  • The changes configured in the template are reflected in the journaling printouts.