...
Assuming you have the following TeLiTab connected to the parameter MainDimensions#:
3"
BOT" 4
"CB" .65
"LOB" 6
4 "B" "LPP" "T" "VOL"
"1" 8.33 50.0 2.08 564
"2" 9.17 55.0 2.29 751
"3" 10.00 60.0 2.50 975
"4" 10.83 65.0 2.71 1240
"5" 11.67 70.0 2.92 1548
To generate the Word document containing this dataset as proper Word table, we use the following relation (see also WINWORD$() ):
MyReport$ = WINWORD$ Appendix_element.rtf("Report_" + STR$(TIME(0)) + "_Set_"+STR$(ORCA(1)) + ".doc", 0, VBA_Macro$, ItemName)
As you see, in this relation VBA_Marco$ and ItemName are requested (and they are put in the Word template, see the example knowledge base below).
The parameter ItemName is just a parameter to give a name in the generated document. VBA_Marco$ contains the actual TELITAB2WORD$ function to generate the VBA code required as Word macro in the document to generate the table. VBA_Marco$ could have the following relation (in this case we have made the relation fully parametric but you can also provide the above described values right away):
VBA_Macro$ = TELITAB2WORD$(MainDimensions#, ParameterStyle, TableStyle$, Transposed, Mode)
With
MainDimensions#, the above dataset;
ParameterStyle, user input for the ParameterStyle, for instance a select box using an <EQ> construction in the reference of the parameter and the @EQEXPLAIN attribute in the data slot of the parameter;
TableStyle$, contains either a text document with descriptions for the Table style (such as different example presented below) or determined by an expression to generated this document for TableStyle$ using separate parameters
.
FormattedBln$, ParameterBoldBln$, FontStyle$, OutsideBorder$, InsideGrid$, CaseNumbersBln$, andTableAlignment$.The relation could be (see also the example knowledge base):
TableStyle$ = TEMPLATE$(TEXTITEM$(1),0, FormattedBln$,ParameterBoldBln$,FontStyle$,OutsideBorder$,InsideGrid$,CaseNumbersBln$,TableAlignment$)
with in the dataset:
TEXTITEM1=
|Formatted:=~FormattedBln$
ParameterBold:=~ParameterBoldBln$
Font:=~FontStyle$
OutsideBorder:=~OutsideBorder$
InsideGrid:=~InsideGrid$
CaseNumbers:=~CaseNumbersBln$
TableAlignment:=~TableAlignment$|
Examples of TableStyle$ definitions:
Centred, unformatted: Formatted:=False Centred, formatted, with black parameters: Formatted:=True Left aligned, formatted, with normal parameters: Formatted:=True Left aligned, formatted, with normal parameters, transposed table: Formatted:=True Centred, formatted, with black parameters, table without case numbers: Formatted:=True Centred, formatted, with black parameters, table without case numbers, transposed: Formatted:=True Left aligned, formatted, with normal parameters, larger courier font: Formatted:=True Left aligned, formatted, with normal parameters, no case numbers, larger courier font: Formatted:=True Left aligned, formatted, with normal parameters with no outside grid lines: Formatted:=True Left aligned, formatted, with normal parameters with no inside grid lines: Formatted:=True Left aligned, formatted, with normal parameters with no inside grid lines, no case numbers: Formatted:=True |
Transposed, user input to present the table transposed
Mode, user input for the mode of the function
The result of
MyReport$
will of will be a Word document containing the table. For instance:
...
Quick links: Function Functions overview | Attribute overview | Constants overview | Dimensions overview