Custom Tables and Fields

If you add a custom field to a table that is already used in a report, you may need to refresh the report data in order to access the new field within Crystal Reports’ Field Explorer Bar.

You can add ‘custom’ tables, such as Data Tables, Data Grids,and Historic Views, to the ClearSCADA database. We advise that such tables are given names that start with letters other than C or CDB, to differentiate them from ‘standard’ tables.

You can use ‘custom’ tables in your reports, in a similar way to ‘standard’ tables.

Using a ‘custom’ table can reduce the time that it takes to configure a report using the Crystal Reports application.

A Historic View, for instance, can be used to allow Crystal Reports to access sampled historic ClearSCADA data. A Historic View represents a specific calculation (for example, the average of a set of values) and includes a resample interval and time period over which historic data is sampled. You can display the results of the calculation in a report—for example, the average value of a particular point at 4-hourly intervals over the past week. For information on setting up Historic Views, see Historic Views in the ClearSCADA Guide to Server Administration. A Historic View table exists in the database for each Historic View that has been configured on your system. For further information on each table, see the database Schema. For information on using the Schema, see Working with the Database Schema in the ClearSCADA Guide to the Database.

A Data Grid, is typically used to extract data from multiple database items into a single table, which is simple and efficient to query from a report. ClearSCADA can perform a variety of calculations on values in the database, the results of which populate the Data Grid. The Data Grid values can then be displayed in a report, in the same way as data from ‘standard’ tables. For further information, see Configuring Data Grids in the ClearSCADA Guide to Core Configuration. For an example of how a Data Grid can be used in a report, see Embedded Data Grid Content.

A Data Table is typically used to store data from multiple sources in a single table. The Data Table’s values can then be displayed in a report, in the same way as data from ‘standard’ tables. For further information, see Configuring Data Tables in the ClearSCADA Guide to Core Configuration.

We do not recommend renaming or removing fields from a ‘custom’ Table, after that table has been attached to a report. However the table data can be re-mapped within the Crystal Reports application to reflect changes (see Map Field Changes to a Custom Table).

The topics in the rest of this section contain further information on using custom fields. The topics comprise:


Disclaimer

ClearSCADA 2017 R3