6. Html-Reports
2 minute read
The Html-Reports mix normal html with control commands. It is recommended that the template is build like this to avoid compatibility issues: Template
<!-- saved from url=(0023)http://www.contoso.com/ -->
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=11">
<script type="text/javascript">
function LoadSearch(searchString) {
window.external.notify(searchString)
}
</script>
<style type="text/css">
<!-- Css commands -->
</style>
</meta></head>
<body style="font-family: Segoe UI;">
<!-- Main body content. -->
</body>
</html>
To control the flow of the text, there are control commands defined to serparte the Text into sections.
** **
** **
Controll-Commands
| Code | Description |
|---|---|
| !Table(name=“A_Elevations” foreignkey=“ElevationGroupID” condition=“A_Elevations.XGUID=params.ElevationGUID” ) !EndTable | Starts the table with the name “A_Elevations” and needs an foreignkey. (condition is optional) |
| !Header … !EndHeader | Header-Section of the Table.(condition is optional) |
| !Footer … !EndFooter | ** **Footer-Section of the Table. (condition is optional) |
| !If (condition=“A_Elevations.Name <> A_Elevations.PhaseName AND A_Elevations.ColorInsertions_Long <>’ ’ “)!EndIf | If - Section that checks for the given Condition. |
| !Else … !EndElse | The Else-Section is optional but when used it is related to the predecessor If-Section |
| !DataLine(condition=“UserVars.UserBool9=1”) … !EndDataLine | The Dataline-Section is used if the Variables used in it can have multiple Values.It will show all of the possible Values. |
In between the Sections, it is possible to use variables to get Values from the database.
Variables
| Code | Description |
|---|---|
| v$(Profiles.ArticleCode_Supplier) | Returns the value for “ArticleCode_Supplier” from the table “Profiles”. (Needs to be inside the “Profiles” table section.) |
| drawing$(Insertions.Picture1) | A Varibale used for a Picture |
| fstr$(Articles.Units_Output,“0.##”) | Formats the Value from “Articles.Units_Output”. (For further formatting examples see http://samples.pdmlab.com/stringformatting ) |
| barcode$(Elevations.Barcode,EAN_13) | Returns the Value of “Elevations.Barcode” as EAN_13 formatted Barcode as .svg (For possible Formats see https://zxing.github.io/zxing/apidocs/com/google/zxing/BarcodeFormat.html ) |
| loadRtfFile$(Elevations.MountingComment) | Returns a RTF Text as PlainText |
Useable parameter
- params.projectguid,
- params.sashguid
- params.insertionguid,
- params.profileguid,
- params.elevationguid,