Using Database Tables within Crystal Reports

When producing a Crystal Report, you need to specify the Geo SCADA Expert table(s) that contain the fields that you want to display in that report (see Provide Access to the Relevant Database Tables).

In order to ascertain which database table(s) you need to add to a report, you need to use a web browser to display the Geo SCADA Expert Database Schema (see Access the Database Schema in the Geo SCADA Expert Guide to the Database). From there, you can ascertain which fields and therefore which table(s) you need to add to your report(s).

You can add a single database table or multiple tables to each report. Typically, reports that query historic data reference two or more tables, whereas other reports typically reference a single table.

Example:

Taking into account the class structure given in the example above (see Working with Geo SCADA Expert Database Tables), the database tables that contain information about DNP3 Analog Input points include:

CDBObject—The base table that contains information that is common to items in the database.

CAlarmObject—This table includes information that is common to items that support alarms in the database. It is inclusive of the information in the CDBObject table, with the addition of alarm information. The table entries are therefore limited to those for items that support alarms.

CDBPoint—This table includes information that is common to points in the database. It is inclusive of the information in the CAlarmObject table, but the table entries are limited to, and include additional information on, all points in the database.

CAdvPoint—This table includes information that is common to advanced driver points in the database. It is inclusive of information in the CDBPoint table, but the table entries are limited to, and include additional information for, points on advanced drivers.

CAdvPointCDRLog—This table includes information that is in the CAdvPoint table, with the addition of information that is specific to advanced driver points that support current and logged data. The table entries are therefore limited to those types of point.

CDNP3Point—This table includes the information that is in the CAdvPointCDRLog table, with the addition of DNP3-specific point information. The table entries are therefore limited to those for DNP3 points.

CDNP3AnalogIn—This table includes the information that is in the CDNP3Point table, with the addition of DNP3 analog input-specific information. The table entries are therefore limited to those for DNP3 Analog Input points.

In addition to the above, there are various other database tables that can prove useful for reporting point data. For example:

CDBHistoric—This table contains information on data that has been stored historically within Geo SCADA Expert. Use this table with care.

CDBEventJournal—This table contains information on the events that have been logged in Geo SCADA Expert. Use this table with care.

If more that one table is used for a report, you need to specify how the tables relate to each other (see Specify the Links Between Multiple Tables).

For complex reports, you may want to consider using Data Grids (see Custom Tables and Fields).

For reports that contain more than one query, such as reports that query several unrelated database tables, use subreports in those reports. For an example that demonstrates the use of subreports, see Use a Subreport to Include Unrelated Data in the Same Report.

Further Information

The Naming Convention used for Database Tables.

Other historic tables that you might want your reports to reference: see Other Tables in the Geo SCADA Expert Guide to the Database.


Disclaimer

Geo SCADA Expert 2022