<< Click to Display Table of Contents >> The FMT form (FMT file) |
The FMT form controls which Excel form to use and how to fill it with the desired information.
Basically, the FMT form used for Excel reports is based on the technology of endless FMT forms (regardless whether the Excel form is endless or not). More information is found in the topic named Endless FMT forms.
The FMT form consists of two parts:
•The header
•The main part
Remarks, which are disregarded in the generation process, can be added anywhere in the FMT form, to make it easier to understand.
Lines beginning with two slashes (“//”) are regarded as such comments.
Since the FMT forms used in this context might be somewhat cryptic for someone not familiar with them, the use of descriptive comments can be a valuable aid.
The picture below shows a theoretical example. (It is somewhat squeezed to make it easier to follow. In real life the fields of it are too narrow to accommodate typical data).
Figure 1447: Theoretical example of an FMT form for an Excel report. In reality the fields of it are too narrow for practical use.
The first six lines of the FMT form specify the following items:
Line |
Variable |
Explanation |
---|---|---|
1 |
Excel template file |
Excel template file The file name of the Excel form is specified here. Please note that the form must be located in the directory X:\ELSA\II\REPORTS\EXCEL (or similar).
|
2 |
Start Row |
The line number in Excel where the first data should be entered. If the title is located in line 1 the value here could typically be 2.
|
3 |
End Row |
The line number in Excel where the last data of the first sheet should be entered. If more space is needed an additional sheet is added.
If an Excel form with fixed number of lines is used the typical value here is the line number of the line directly above the footer.
If and endless Excel form is used, the value should simply be defined as zero (“0”), which is interpreted as the exact opposite (indefinite).
|
4 |
Break on changed column |
Three break modes are available.
No break at all is specified as zero (“0”).
If page break should be performed when the content of a certain column shifts, the value should be set to one (“1”).
If line break should be performed when the content of a certain column shifts, the value should be set to two (“2”).
|
5 |
Breaking column number |
The column number used for line or page break. Please note that columns are counted from 1 and upwards (the letters of Excel are not used in this specification).
When the content of a specified column is different from the line above, a break is made.
For page break, a new sheet is created. This means that all lines in the same sheet will have the same value in this column.
For line break, an empty line is inserted.
|
6 |
EXCLUSIVE |
“Exclusive” in this context means that if the content in a cell is identical with the cell directly above, the cell will be left empty. This is in many cases an effective way of making a report more easy to read.
The column numbers in which the Exclusive feature should be active is defined with separating commas. Example:
If this variable is omitted, the Excel report generation feature will run in compatibility mode. In that mode, the behaviour will be the same as it was in cadett ELSA R32. Please refer to the cadett ELSA Additional Manual – New Features in cadett ELSA R32.pdf for a description of that.
If you do not want to use the Exclusive feature but do not want to run in compatibility mode either, please simply omit the column numbers:
|
It is not possible to rearrange the first six lines described in the table above. The sequence must be the one described.
Thereafter a section with an arbitrary number of lines follows. In that section it is possible to specify how a title field or similar should be filled with information.
Each cell that should be filled with a value is specified with a line of its own in this part of the FMT form. The simple syntax of each such line is:
Cell=Report variable
Example:
M32=!SIGN
(Cell M32 is filled with the value obtained with the !SIGN report variable (signature).
The title field section of the FMT form is ended with a line containing:
..EndInit..