Skip to main content
Skip table of contents

Word Template - Tips and Tricks

As the Word Templates are highlight customisable we put together some guidelines and advice on how to set it up.

WHAT YOU CAN DO USING THE WORD TEMPLATE

Using the word template, you can change

  • The header (adding your own logo or modify the project information included (see available fields below)

  • Footer

  • Default fonts for headings and text

  • Change list and other styles

  • Add watermarks

Note: the default template contains two pages which BOTH need to be kept, one for portrait and one for landscape mode


HOW TO DO IT

To modify the styles of generated Word and PDF documents

  1. Download the default template (empty)

  2. Modify it as needed (see above – note: keep both pages)

  3. Upload it again to Matrix (through Select Word Document)

  4. Create a DOC or PDF to test it

  5. If needed download and fix the modified template


HOW DOCUMENT GENERATION WORKS

The DOC items in Matrix consists of some sections, which define how the data from the database is rendered (e.g. as list of requirements or trace matrix). The Word template define the basic look of the page, e.g. fonts for headings or page header and footers.


DEFAULT FIELDS FOR HEADERS / FOOTERS

These fields can be added in the header or footer. When a DOCX or PDF is generated from Matrix, their value is computed and inserted accordingly. To add the fields you can:

  1. Copy them from this document, or

  2. Toggle the macros in word (using Use Alt-F9) and edit them manually

  3. Insert them through the UI (Note this depends on the version of word)

    1. Select the tab Insert than Quick Parts / Fields

    2. Select DocProperties and the property name from the table belo


DEFAULT FIELDS:

Document Property Name

Meaning

Example

Company

Is the company name (first part of the url of the projects)

For a URL “demo.matrixreq.com” it would be

demo

ProjectId

Just the project Id

WHEELY

ProjectName

Just the project name

Wheelchair for children

Title

Is the name of the report as defined in the xslt template of the report

Test Status and Planning Report

DateXML

Is the report creation date (or date when a signed document was created, not the download or signature date) in the time zone and format specified for the server (customer)

2015/02/02 21:23:02

DateDOC

The date the PDF or WORD file was created. This differs from the DateXML above (for SIGNED documents).

2015/03/03 15:03:01

DocumentNumber

For normal reports just a number reflecting how many times the report has been generated.
For controlled documents the document ID and in brackets the reflecting howmany times the document has been generated.

0012


SRS (0012)

ControlledDocName

The document id of a controlled document

SRS

Revision

The revision (number of times the document has been generated)

0012

RevisionPlain

The revision (number of times the document has been generated) without leading 0

12

AuthorEmail

The email of the person who created the report (the person who created the signed document or downloads the report / controlled document)

AuthorName

The full name of the person who created the report (the person who created the signed document or downloads the report / controlled document)

ReportId

The id of the report. For signed documents it is the name of the underlying controlled document.

REPORT-12

DOC-13

ReportLink

A link to the report

demo.matrixreq.com/PROJECT/REPORT-12

ItemId

The id of document or report

DOC-12, SIGN-13, or REPORT-12

ItemLink

The link of the report, document, ...

<a href="project.matrixreq.com/.../SIGN-4">SIGN-4</a>

ItemUrl

The url of the report, document ...

project.matrixreq.com/.../SIGN-12

DocId

Shows ID of used controlled document for DOC and SIGN

SIGN-4

DocLink

The link to the DOC for DOC and SIGN

<a href=”project.matrixreq.com/.../DOC- 12>DOC-12</a>

DocUrl

The URL of the originating DOC

project.matrixreq.com/.../DOC-12

TemplateId

The value of the sourceRef Field

. MatrixQMS/SIGN-75

MX_DocProperty_Revision

Insert a revision number defined in the last row of a table of the document table with a revision columns (see IFU)

Ver 2.3

MX_DocProperty_1 (also 2,3, ...9)

Can be mapped to a text line in a DOC (see IFU) e.g. to fill a title page

Some text entered in a text line of the DOC


DEFAULT STYLES

You can also modify the default styles and fonts used by documents. To do some type some text in the template, select the style, modify the style and apply it (as you would normally do to change the style in a complete word document). Besides the standard styles, like Heading 1,2,3 etc., there are also some special styles (e.g. mr_fieldname) which are used to format some specific text in the generated documents. See some examples below.

Note: richtext fields are formatted using the style applied to text in the field itself and some css rules which can be modified in the admin client (in the settings Word / Pdf Styling).

PARAGRAPH STYLES:

Normal text uses the style “Normal”.

HEADINGS

BULLETS

CUSTOM PARAGRAPH STYLES

Used to define entire graphs

Example

Description

Style

Author:

Name of fields

mr_fieldname

John

Values of fields in table cells

mr_fieldvalue

/Requirement/User Requirement/REQ-1

Path of items in item table

mr_breadcrumb

CHARACTER STYLES

used to highlight text inside paragraphs:

Example

Description

Style

REQ-125

Id and name of an item: e.g.

REQ-125 Performance Requirement

mrc_itemlink

Performance Requirement

mrc_itemtitle

23

Number in statistic table, e.g. 23 Requirements

mrc_statcount

See more...

Link to items inside the document

mrc_inlink

MISC

e.g. colors for table cell background

Example

Description

Style

Background of header cells in tables.
Note the color of the defined style is used as table background as there is no style for table cells.

mrt_tableheader


CUSTOM FIELDS FOR HEADERS / FOOTERS

ADDING SMART TEXT BLOCKS

In Matrix it is possible to define smart text blocks which can be inserted into rich text fields or the document template. To use smart text tag in a template, do the following

  1. Make sure it is a plain text template defined for the project

  2. Create a custom property in Word, e.g. in Word 2007:

  3. Insert it in the template (header or footer)

    1. To insert it, select the insert tab and choose Quick Parts > Insert

    2. Choose DocProperty as Field name the wanted property

    3. The new field should be in the document, e.g.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.