Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
ParameterBold:=True
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowCenter

Centred, formatted, with black parameters:

Formatted:=True
ParameterBold:=True,
ParameterBackColor:=wdColorBlack,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowCenter

Left aligned, formatted, with normal parameters:

Formatted:=True
ParameterBold:=False,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowLeft

Left aligned, formatted, with normal parameters, transposed table:

Formatted:=True
ParameterBold:=False,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowLeft

Centred, formatted, with black parameters, table without case numbers:

Formatted:=True
ParameterBold:=True,
ParameterBackColor:=wdColorBlack
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=False
TableAlignment:=wdAlignRowCenter

Centred, formatted, with black parameters, table without case numbers, transposed:

Formatted:=True
ParameterBold:=True,
ParameterBackColor:=wdColorBlack
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=False
TableAlignment:=wdAlignRowCenter

Left aligned, formatted, with normal parameters, larger courier font:

Formatted:=True
ParameterBold:=false,
Font:=Courier 14
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowLeft

Left aligned, formatted, with normal parameters, no case numbers, larger courier font:

Formatted:=True
ParameterBold:=false,
Font:=Courier 14
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=False
TableAlignment:=wdAlignRowLeft

Left aligned, formatted, with normal parameters with no outside grid lines:

Formatted:=True
ParameterBold:=False,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleNone
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowLeft

Left aligned, formatted, with normal parameters with no inside grid lines:

Formatted:=True
ParameterBold:=False,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleNone
CaseNumbers:=True
TableAlignment:=wdAlignRowLeft

Left aligned, formatted, with normal parameters with no inside grid lines, no case numbers:

Formatted:=True
ParameterBold:=False,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleNone
CaseNumbers:=False 
TableAlignment:=wdAlignRowLeft



Transposed, user input to present the table transposed


 

Mode, user input for the mode of the function


The result of  will of 

MyReport$

 will be a Word document containing the table. For instance:

...

  1. An template that is included as binary (click here to download the separate template);
  2. A TableStyle$ definition that is highly parametric enabling you to make several style changes and see the result. In all cases the TableStyle$ parameter will be generated on the basis of the individual choices.

 

Quick links: Functions overview | Attribute overview | Constants overview | Dimensions overview