Models (Example, last step)
Define Additional Field Formats to use when modifying a report (when adding items at a later date) or when creating a report if the query columns have not been assigned a specific format. Important: the position of these fields is not important, since only their attributes and formats will be used according to the data types concerned.
Dynamic Fields in the Details Block
For example, in the previous Model place a Data/Formula field in the Details block then right-click and select String Format from the list of items displayed.
Define the attributes for this alphanumeric field which does not have a specific format except that it is aligned to the left and define the size, font, font colour and background you wish. Note the fields internal name will be !Format_Data:
In the same example, place the Data/Formula field in the Details block then right-click and select Number Format from the list of items displayed.
Define the attributes for this number field which should be aligned to the right, specify the size, font, font colour and background as well as the number format to use (for example the format proposed by Windows or a customized format such as # ###,##). Note that the fields internal name will be !Format_Num:
In the same example place the Data/Formula field in the Details block then right-click and select Date Format from the list of items displayed.
Define the attributes for this Date type field which should, for example, be aligned to the left, specify the size, font, font colour and background as well as the Date format to use (for example the format proposed by Windows or a customized format such as dddd dd mmmm yyyy). Note that the fields internal name will be !Format_Date:
If necessary, repeat the steps above to add a Time Format or a Datetime Format.
Static Fields in the Details Block
If a Text/Label type item is added to the Details block at a later date it is also possible to predefine default attributes. For example, to do so, place a Label type field in the Details block then right-click and select Static Format from the list of items displayed.
Define the attributes for this Static field which should, for example, be aligned to the left, specify the size, font, font colour and background. There is no format to define for Static fields. Note that the fields internal name will be !Format_Static:
Dynamic Fields in a Header Block
If a Data/Formula type item is added to the Report Header or Page Header blocks at a later date it is also possible to predefine default attributes and formats to be applied. For example, to do so, copy (or create if these fields have not yet been defined) all the fields managing formats from the Details block to the Page Header block.
Note that objects internal names are duplicated and end with a number to avoid doubles. For example the !Format_Num field will be copied as !Format_Num2, the !Format_DateTime field will be duplicated as !Format_DateTime3 etc.
These keywords will be recognised by the software since they start with the reserved syntax !Format_Data, !Format_Num, !Format_Date, !Format_Time, !Format_DateTime and !Format_Static.
Static Format in Header Blocks
If the user adds a Text/Label type item in a Header block at a later date, it is also possible to predefine its attributes by default (however, if the First Header field exists, its attributes will be used by default). For example, to do so, place a Label type field in the Header block, right-click and select Static Format from the list of items proposed.
Define the attributes of this static field which the user could, for example, align to the left, select the size, font, font colour and background. There is no need to define a format for a Static field. Note that this fields internal name will be !Format_Static or will begin with the text !Format_Static if the same kind of field already exists in the Details block.
Saving Models
Save the modifications made and close the Model Editor. The Models design is now terminated and can be used when creating new reports.
Note that all the models are saved in the D7MODELS.D7 file which is in the ClicknDECiDE Builder\Models directory. It is recommended to perform a backup from time to time and in particular before installing an update or a new version of ClicknDECiDE Builder.