5. Word-Reports - XML
2 minute read
**Line-Types: **0 - normal 1 - no table (just tabstops)
**Field-Types: **0 - normal field 1 - text-file to include in the report 2 - image to add to the report
**Field-Alignments: **0 - left 1 - center 2 - right
Border (Frame Position) 1 top 2 bottom 4 left 8 right 16 horiz 32 vert
lineType (FramePosition) 0 - no 1 - yes
Use Concat=”1” to connect columns.
Images (Field Type 2)
contents=“img$(Filepath+Filename, Width in MM, Height in MM”
Samples: <field …. contents=“img$(A_Elevations.Picture1_File, A_Elevations.Picture1_WidthMM, A_Elevations.Picture1_HeightMM)” /> <field …. contents=“img$(C:\Logos\Logo.jpg, 40, 20)” />
Formats string
Sample: Fstr$(A_Elevations.Amount, ‘#,###,##&.&&’, 5)
- defines the format
- 1 deletes zeros/blanks from the left side, 2 empty string if NULL, 4 delete zeros from the right side
Sample: Str$(A_Elevations.Amount,0,2)
- minimum length
- amount of digits
Samples:
**XML Parser Funktionen: **
str$: Beispiel: zur Umwandlung in einen String. str$(elevations.amount,0,2)
isFirst: prüfen ob “tableName” die erste Tabelle ist. Beispiel: isFirst(tableName)
cond: eine Abfrage, deren Parameter vom Wert double sein müssen. Beispiel: cond(condition,valTrue,valFalse)
cond$: eine Abfrage, deren Parameter Strings sein müssen. Beispiel: cond$(condition,valTrue,valFalse) - für String-Werte
round: eine Funktion zum Runden von double Werten. Beispiel: round(number,fractions)
trunc: eine Funktion zum Abschneiden der Nachkommastellen von double Werten Beispiel: trunc(zahl)
fstr$: zum Formatieren eines Strings. Beispiel: fstr$(elevations.amount, ‘#,##0.0’)
loadRtfFile$: Funktion zum Laden einer RTF-Datei. Beispiel: loadRtfFile$(fieldName)
img$: eine Funktion zum darstellen von Bildern und editieren der Bildabmessungen Beispiel: img$(imagePath,pictureWidth,pictureHeight)