Versions Compared

Key

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

Forms Editor (Reference) provides a comprehensive design environment for creating reports with dynamic content, tables, symbols, and trends. The Forms Editor enables:

  • WYSIWYG report design
  • Dynamic tag integration
  • Table creation (static and dynamic)
  • Symbol and trend insertion
  • Multi-format export
  • Localization support

Access via Reports → Forms Editor

In

This page has information about how to use reports. Reports can have multiple graphical components: tags, symbols, tables, and trends. All these components have the capability to update data once a report is generated; providing users with the most recent data in their reports. Reports can be saved into files, like XPS, HTML, Unicode, ASCII, or PDF.

On

this page:

Table of Contents
maxLevel

3

2
minLevel2
indent10px
excludeSteps
stylenone



Reports → Tutorial | Concept | How-to Guide | Reference



Editor Interface

Toolbar Components

  • Font Controls - Type, size, style
  • Paragraph - Alignment, spacing, indentation
  • Insert - Tags, symbols, tables, images
  • Format - Colors, borders, backgrounds
  • Tools - Preview, print, export

Text Area

Main editing canvas with:

  • Real-time preview
  • Drag-and-drop support
  • Context menus
  • Grid alignment

Adding Dynamic Content

Tags

Insert real-time tag values:

Method 1: Direct typing

{Tag.TagName}
{Tag.TankFarm/Tank1/Level}
{Tag.Production/Production_Count}

Method 2: Tag Browser

  1. Right-click toolbar Tag button
  2. Browse and select tag
  3. Tag inserted with formatting

System Tags

{Info.Date}           // Current date
{Info.Time}           // Current time
{Client.UserName}     // Logged user
{Page.Number}         // Page number
{Page.Total}          // Total pages

Tables

Static Tables

Fixed structure with manual content:

  1. Click Table button
  2. Specify rows and columns
  3. Configure appearance:
    • Borders and shading
    • Cell alignment
    • Column widths
  4. Populate cells manually or with tags

Example:

| Parameter | Value | Status |
|-----------|-------|--------|
| Level | {Tag.Tank1_Level} | {Tag.Level_Status} |
| Temp | {Tag.Tank1_Temp} | Normal |

Dynamic Tables

Query-driven content:

  1. Insert query reference
  2. Map columns in first two rows:
    • Row 1: Display names
    • Row 2: Database columns

Example:

| Product Name | Quantity | Price |
| ProductName | Qty | UnitPrice |
{Dataset.Query.ProductList}

The table auto-populates from query results.


Symbols and Graphics

Adding Symbols

  1. Click Symbol button
  2. Select from library
  3. Symbol updates dynamically

Creating Trend Symbols

  1. Right-click trend in display
  2. Select Make New Symbol
  3. Insert via Symbol button
  4. Trend updates with latest data

Localization

Enable Translation

Set dictionary before generation:

csharp

Using the Report Editor

To access editor, go to Reports / Forms Editor.

There are two areas in the Report Editor, the top toolbar with formatting tools and the text area, where the user can model the document like any classical text editor.

Adding Tags

This can be done in the text area, by writing the correct command.

For internal tags, the command is the tag's name, and it must be written between curly brackets so the system understands it as a tag and not as a string.

Code Block
languagetext
themeConfluence
{Tag.<TagName>}

An easier way to add a tag to a report is by right-clicking on the toolbar Tag Button and selecting the desired tag. The tag will be placed in the document in accordance with its formatting.

Adding Symbols

To add a Symbol, click the Symbol button and choose the one you want. If you change the appearance of a Symbol after including it in your report, the exported document will contain the latest version of the Symbol.

Adding Tables

If the table has a limited number of lines, use a Static Table. If not, use a Dynamic Table.

Static Table

To insert a Static Table, click on the Table button. You can choose the number of rows and columns, and modify the table’s appearance. Then, you need to manually populate the cells of the table.

Dynamic Tables (populated via queries)

To add a Dynamic Table, you must insert the query name or table that it will fetch data from when the report is saved.

To select and name the desired rows, write the Column Name from the final Report in the first row and the Column Name from the database in the second row.

\

Tips and Tricks

TrendCharts

To add a TrendChart Element to a report, you will need to create a new Symbol from the Trend. To do so, right-click the desired element and select Make New Symbol.

Go to Reports /Forms Editor, and click Symbol in the header bar. Then, select your Trend Symbol.
Info
titleNote

If the Trend is modified in your Solution, the one inside the Report will be updated automatically.

Translating Tags and Tables

For reports that have different translation options, the first requirement is to create Dictionaries in Displays / Localization.

To switch between languages, use the property:

code

@Client.Localization = "Spanish";  // 
for
Use 
default
Spanish dictionary
//or
@Client.Localization = "
<Dictionary_Name>"
";         // Use default

Translatable Elements

  • Tag descriptions
  • Table headers
  • Static text with locale keys
  • Custom messages

Translation Callback

For dynamic translation:

csharp

public void OnReportCustomTableCell(string reportName, 
    string columnName, DataRow row, TableCell tableCell)
{
    if (row["ItemName"].ToString() == "{object}")
    {
        string translated = @Client.Locale(row[columnName].ToString());
        Run cellText = (tableCell.Blocks.FirstBlock as Paragraph)
            .Inlines.FirstInline as Run;
        cellText.Text = translated;
    }
}

Headers and Footers

Creating Headers

  1. Create separate report form
  2. Design header content:
========================================
     Company Name
     {Info.Date} - {Info.Time}
     Production Report
========================================

Creating Footers

  1. Create footer form
  2. Add page numbering:
Page {Page.Number} of {Page.Total}
Generated by: {Client.UserName}

Linking to Main Report

  1. Open main report properties
  2. Set Header property to header form
  3. Set Footer property to footer form

Special Features

Alarm Audit Trail

Add alarm history to reports:

{Alarm.Group.AuditTrail}

With custom messages:

csharp

For Tables and Tags, the property above should be enough. However, the callback function must be used to translate an Alarm Audit Trail with added Custom Messages and Comments. 

Info
titleAlarm Audit Trail

To add information about the Alarm Audit Trail to your report, choose Tag on the top toolbar, and navigate to Process Modules / Alarms / Group / AuditTrail.

To enable the translation of custom messages, you must add a string element to the itemName input parameter, as seen below:

Code Block
string itemName = "{object}"

A final AddCustomMessage with localization capabilities should look like this:

code

@Alarm.AuditTrail.AddCustomMessage(
    "User: 
{" 
+ 
@Client.UserName 
+
 "}
 logged",
    null, 
null, null, "{object}", null, null
);

The code added to the callback function is presented below:

Append Mode

Accumulate data in existing file:

  1. Set Append column to 1
  2. New data adds to file
  3. Preserves historical records

Dynamic Cell Colors

Apply conditional formatting via callback:

csharp

code

public void OnReportCustomTableCell(string reportName, 
    string columnName, 
System.Data.
DataRow row, 
System. Windows.Documents.
TableCell tableCell)
{
if (row["ItemName"].ToString()
 
==
 
"{object}") { string[]
  
Message_Split_Parts
double value = 
Convert.ToDouble(row[columnName]
.ToString().Split(’{’, ’}’
);
 
string
 
Translated_Message
 
= ""; for
 if (
int
value 
i
> 
=
90)
 
0;
 
i
 
<=
 
Message_Split_Parts.Length
 
-
 
1;
 
i++) { // Translate the custom message part Translated_Message += @Client.Locale(Message_Split_Parts[i]); Run cellText = (tableCell.Blocks.FirstBlock as Paragraph).Inlines.FirstInline as Run; // Replace the original message with the translated one. cellText.Text = Translated_Message; } } }

The DataGrid is added to the Report following the default logic for tables. The DataGrid language will depend on the dictionary that was enabled when the report was saved.

Headers and Footers

To add a Header and/or Footer to a Report, you need to create one independent report for each. Then, set the reports as the Header and Footer in the Main Report. 

The Header and Footer data (can be text, image, or page numbering) will be replicated throughout the main document.

Appends

By default, when a new report is generated, it replaces the old one if the SaveFile path and ReportName are the same.

However, it is possible to append the most recent data into an existing report, which allows the old and new data to be displayed in the same ReportFile.

To do so, you need to enable the Append column on Reports / Forms, and insert the number ”1” in it.

 tableCell.Background = Brushes.Red;
    else if (value > 80)
        tableCell.Background = Brushes.Yellow;
}

Export Formats

FormatExtensionFeaturesUse Case
PDF.pdfFull formatting, imagesProfessional reports
XPS.xpsWindows native, exact layoutInternal distribution
HTML.htmlWeb-ready, hyperlinksOnline viewing
ASCII.txtPlain text, no formattingData export
Unicode.txtInternational charactersMulti-language

Best Practices

  1. Test preview - Verify before saving
  2. Use templates - Reusable headers/footers
  3. Validate queries - Check data availability
  4. Handle nulls - Default values for missing data
  5. Size images - Optimize for output format
  6. Test translations - Verify all languages
  7. Archive reports - Implement retention

Troubleshooting

Missing data:

  • Verify tag names and paths
  • Check query execution
  • Confirm data timing

Formatting issues:

  • Match font availability
  • Check export format limits
  • Review page margins

Translation problems:

  • Confirm dictionary loaded
  • Check locale keys
  • Verify callback function

Performance:

  • Limit query results
  • Optimize images
  • Reduce complex formatting



In this section...

Page Tree
root@parent
spaces93DRAF

Examples Using Report

Tags and Symbols

Below is an example of the creation of a report with all elements mentioned above. It is a sample report with a Trend, Tags, and Tables.  

The Table was created in a static format for it to be populated by different Tags (and their current values at the moment the report was saved) as well as the timestamp of their last value.

There is also a Trend element (added as a symbol) that displays the configured Pens (Tag.Temperature and Tag.Pressure) when the Report was saved.

Finally, the created PDF file can be seen below.

You can also check Dynamic Cell Colors in Reports for a code example on how to achieve that effect.

In this section:

Page Tree
rootV10:@parent
spacesV10