...
Word report
...
...
Example report | child of “Data Data to Word report”report | Singular Entity Type: singular obligatory |
Chapter 1: Main Dimensions | child of “Example report” Example report | Singular Entity Type: singular obligatory |
Chapter 2: Deck data | child of “Example report” Example report | Singular Entity Type: singular obligatory |
In Entity “entity Example report
” , the main document will be created, which includes the separate documents of the Entities “entities Chapter 1: Main Dimensions
“and “ and Chapter 2: Deck data
“.
Parameter name | Dimension | Determined by | Reference | In Class |
| [$] | USL: User of System/function | Report document | Word report |
| [$] | USL: User of System/function | Name of Word file | Word report |
| [$] | USL: User of System/function | Document tag | Word report |
| [$] | VR: User only | Word table style information Example: | Word report |
| [$] | USL: User of System/function | VBA Macro that is executed by MS Word | Word report |
| [BLN] | VR: User only | Mode for creating a VBA table macro by TELITAB2WORD() function. If Mode=1 is selected for manipulation by the knowledge engineer, it should be save using a PUT$() function | Word report |
| [BLN] | VR: User only | Orientation of Word table | Word report |
...
Chapter 1: Main Dimensions
...
...
Loa
...
...
Lpp
...
...
Boa
...
...
Dm
...
...
Volume
...
...
Document_Tag$
...
...
Report_document$
...
Word_file_name
...
Volume
and remove @MODIFY because you do not want to allow this here....
Chapter 1: Main Dimensions
...
Loa = ENTITY#(xx).Loa
...
where “xx” is
...
the value of QEntityID
of entity Main Dimensions
...
.
Lpp = ENTITY#(xx).Lpp
...
where “xx” is
...
the value of QEntityID
of entity Main Dimensions
...
.
Boa = ENTITY#(xx).Boa
...
where “xx” is
...
the value of QEntityID
of entity Main Dimensions
...
.
Dm = ENTITY#(xx).Dm
...
where “xx” is
...
the value of QEntityID
of entity Main Dimensions
...
.
Volume = ENTITY#(xx).
...
Volume
where “xx” is
...
the value of QEntityID
of entity Hydrostatics
.
Document_Tag$ = "#" + Report_document$ + "#"
Word_file_name$ = "main_dimensions_" + STR$(TIME(0)) + ".doc"
Report_document$ = WINWORD$ Tutorial_taxonomy_maindimensions.rtf(Word_file_name$,0 , Boa, Dm, Loa, Lpp, Volume)
QEntityData
.In general, the function WINWORD$
opens and creates an RTF document, saves it as Word document and returns the name of the document. Normally, you have to create a an RTF document and store it on in the current applications directory (either of the knowledge base, located in Kbs\_<KnowledgeBaseName>\Applic, or the general Applic directory in My Knowledge). We have already created theTutorial_taxonomy_maindimensions.rtf document which you have to place in the right directory. Do the same for the documents report.rtf, Tutorial_deck_data.rtf and excel file Example.xls.
We have created a multi level approach with one main document (report.rtf) and several sub-documents (Tutorial_taxonomy_maindimensions.rtf) and (Tutorial_deck_data.rtf). A time stamp is included in the filenames. See the wiki for a detailed description of both functions the functions WINWORD$ and and TIME().
For the second report chapter Entity we entity, do about the same as for the first chapter:
...
Chapter 2: Deck data
...
Deck_data#
...
...
Document_Tag$
...
...
Report_document$
...
...
Word_file_name
...
...
Mode
...
...
TableStyle$
...
...
Transposed
...
VBA_Macro$
...
...
Chapter 2: Deck data
...
Deck_data# = ENTITY#(xx).Deck_data#
...
where “xx” is
...
the value of QEntityID
of entity Decks
.
Mode = 0
(0<EQ>Saves as WordMacro_TimeStamp_.bas on working directory and returns file name)
Transposed = 0
(0<EQ>Parameters per column)
...
Document_Tag$ = "#" + Report_document$ + "#"
Word_file_name$ = "deck_data_" + STR$(TIME(0)) + ".doc"
Report_document$ = WINWORD$ Tutorial_deck_data.rtf(Word_file_name$, 0, VBA_Macro$)
VBA_Macro$ = TELITAB2WORD$(Deck_data#, 1, TableStyle$, Transposed, Mode)
QEntityData
.The TELITAB2WORD$ function returns a MS Word macro to create a table in Word based on a given Telitab set, in this case Telitab “Deck_data#”. See the wiki for a detailed description of TELITAB2WORD$ function.
Parameter TableStyle$
contains the Word table style information.
TableStyle$ = TEXTITEM$(1)
Expression Data:
Code Block |
---|
TEXTITEM1=
|Formatted:=True
ParameterBold:=True,
ParameterBackColor:=wdColorGray25,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowLeft| |
Expression Reference:
Code Block |
---|
Word table style information
Example:
ParameterBold:=True,
ParameterBackColor:=wdColorBlack,
Font:=Arial 8.5
OutsideBorder:=wdLineStyleSingle wdLineWidth100pt wdColorAutomatic
InsideGrid:=wdLineStyleSingle wdLineWidth050pt wdColorAutomatic
CaseNumbers:=True
TableAlignment:=wdAlignRowCenter |
Figure 84: Parameter TableStyle$
Finally on the top level we make the overall report:
...