Models Command (Layout Menu)

Once a report is open, this command enables the user to:

image\bullet.gif Create a model using parameters from the current report.

image\bullet.gif Modify or delete existing models.

Designing a Model

Models are designed from existing reports which the user adds additional information to. The model memorizes all the information from the original report (visible or invisible blocks, title, picture or logo, background picture, font and colour, first field positions etc…).

 

Certain model-specific fields can be defined in any block and must meet model item definitions displayed in a list when the user right-clicks on a model field or when they select the Model Items command

 

On the Report Header or Page Header blocks the following item list is displayed: (items that are already used or not applicable to the block will appear dimmed):

image\headermodelitems.gif

 

On the Details block the following list of items is displayed (items that are already used or not applicable to the block will appear dimmed):

image\datamodelitems.gif

 

Object’s Visible Name (modifiable)

Internal Object Name (fixed)

Title 1

!Title1 or starting with !Title1

Title 2

!Title2 or starting with !Title2

First Header

!First_Header or starting with !First_Header

First Column

!First_Column or starting with !First_Column

Static Format

!Format_Static or starting with !Format_Static

String Format

!Format_Data or starting with !Format_Data

Number Format

!Format_Num or starting with !Format_Num

Date Format

!Format_Date or starting with !Format_Date

Time Format

!Format_Time or starting with !Format_Time

DateTime Format

!Format_DateTime or starting with !Format_DateTime

Line Format

!Format_Line or starting with !Format_Line

 

Note that it is not possible to use the same field or the same internal format name twice. For example, if the detail block includes a field named !Format_Num, it cannot contain another field, even with a name starting by !Format_Num. However, another block, for example the Header block, can contain another field with the name!Format_Num2 to define a number format to assign to the whole number field which will be inserted in the Report Header block later.

image\bullet.gif Title Fields

The field(s) must correspond to the proposed selection Title 1  and/or Title 2 and must have the internal names !Title1 and !Title2. If two fields exist, they will be given the same title. Certain reports use two juxtaposed fields to give a shadow effect to the title.

If the !Title1 or !Title2 fields do not exist, then no automatic title will be inserted in the report when it is created.

This field will be assigned the report title (by default the report name).

image\bullet.gif First Header Field

This field will indicate the position of the first Column header in the block selected (Report Header or Page Header). It corresponds to the option First Header and has the following fixed internal name !First_Header. If the !First_Header field does not exist, then no automatic Column Header will be inserted in the report when it is created. If the field exists, then all the Report Header fields will be positioned horizontally from left to right based on the position of the First Header field and will be assigned with this field’s attributes (font, font colour, background colour, character size etc…). If all the headers do not fit on one row then there are three solutions:

image\bullet.gif First Column Field

This field indicates the position of the first Data Column in the block selected (in general the Detail block). It corresponds to the First Column option and has the following fixed internal name !First_Column. If the !First_Column field does not exist, then no Data field will be automatically inserted in the report when the report is created. If the field exists, then all the report’s data fields will be positioned horizontally from left to write based on the position of the First Column and will be assigned with attributes according to the following rules:

 

If all the data fields do not fit on a single row then there are three solutions:

image\bullet.gif Column Format Fields

As mentioned in the above paragraph First Column Field, the format of fields inserted in a report follows the priority of each corresponding column of the query.

However, if no specific format has been defined in the query, then the user can define default values to use when creating a report via a Model.

The user can add fields whose position is not important but whose format will be taken into account, if it is not defined in the query. On peut rajouter des champs dont la position importe peu mais dont le format sera pris en compte, s’il n’est pas défini dans la requête. These additional fields are optional.

These fields will remain invisible in the reports created using a model and they are only used to indicate formats and other attributes to use (colour, font, character size etc… when creating a report but also when adding additional columns to a report at a later date.

It may be necessary to add a static field (label), a dynamic field (data or formula) or a separator (line) to a report. They will be named as follows (already presented in the above table):

:

 

If an item is added to a block in a model-based report at a later date ClicknDECiDE Builder will search for an information field in the model which corresponds to the data type and will assign the attributes and formats defined in the Model.

 

A block can only contain one field for one data type. For example, if the user defines a !FormatDateTime field in the detail block, then this block cannot contain another Datetime format field. However, it is possible to copy this field to the Report Header block to define another Datetime format for the block. In this case, the field’s internal name will begin with !FormatDateTime (for example !FormatDateTime2).

 

Field Search Rules

 

If the !Format_xxxxx field is not found in the corresponding block in the model, then ClicknDECiDE Vision will search in the model’s Details block.

 

If the !Format_xxxxx field was not found in the model’s Details block either, then ClicknDECiDE Vision will either search for a Text/Label in the !First_Header field or search for Data/Formulae in the !First_Column field in the corresponding block in the model.

 

 

Next Step