19.10.2015 Views

workbench-en.a4

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Customizing DBDoc Model Reporting Templates<br />

REL Section REL_LISTING<br />

REL_NAME Variable REL, FOREIGN_KEYS<br />

REL_TYPE Variable REL, FOREIGN_KEYS<br />

REL_PARENTTABLE Variable REL, FOREIGN_KEYS<br />

REL_CHILDTABLE Variable REL, FOREIGN_KEYS<br />

REL_CARD Variable REL, FOREIGN_KEYS<br />

FOREIGN_KEY_ID Variable REL<br />

FOREIGN_KEYS Section SCHEMATA<br />

FK_DELETE_RULE Variable FOREIGN_KEYS<br />

FK_UPDATE_RULE Variable FOREIGN_KEYS<br />

FK_MANDATORY Variable FOREIGN_KEYS<br />

TABLE_COMMENT_LISTING Section TABLES<br />

TABLE_COMMENT Variable TABLE_COMMENT_LISTING<br />

DDL_LISTING Section TABLES<br />

DDL_SCRIPT Variable DDL_LISTING<br />

Using the table<br />

The table shows which variables are defined in which sections. The variable should be used in its correct section, otherwise its<br />

value will not be displayed.<br />

Note<br />

It should be remembered though that the data dictionaries used to perform the lookup form a hierarchical tree, so it is<br />

possible to use a variable defined in a par<strong>en</strong>t section, in a child section.<br />

22.2. Creating a custom template<br />

In the simplest case a template consists of two files. A template file, which has a .tpl ext<strong>en</strong>sion, and a special file info.xml.<br />

The info.xml file has important metadata about the template. A third file is optional, that is the preview image file. This preview<br />

file provides a thumbnail image illustrating the appearance of the g<strong>en</strong>erated report.<br />

One of the easiest ways to create a custom template is to make a copy of any existing template.<br />

For example, you make a custom template based on the Text Basic. The following procedure demonstrates this.<br />

1. First you need to make a copy of the template on which you are going to base your custom template. To do this navigate to the<br />

folder where the templates are stored. Assuming MySQL Workb<strong>en</strong>ch has be<strong>en</strong> installed into the default location on Windows,<br />

this would be C:\Program Files\MySQL\MySQL Workb<strong>en</strong>ch 5.0<br />

SE\modules\data\wb_model_reporting.<br />

2. Th<strong>en</strong> make a copy of the template folder you wish to base your new template on. In this case a copy of the<br />

Text_Basic.tpl folder is made. The copy can be giv<strong>en</strong> any suitable name, for example, Custom_Basic.tpl.<br />

3. Now the info.xml file needs to be edited, to reflect your custom template. The unedited file in this case is shown here:<br />

<br />

<br />

<br />

A basic TEXT report listing schemata and objects.<br />

HTML Basic Frame Report<br />

<br />

<br />

Designed to be viewed with a fixed sized font.<br />

Fixed Size Font<br />

preview_basic.png<br />

fixed<br />

<br />

<br />

report.txt<br />

<br />

<br />

79

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!