CustomReport_Alarms_File is a simple project designed to show how to use a custom report to display alarms stored in a file-based database. Within the System device, a main tag named Level and an auxiliary tag named RAEFileName are defined. The Level tag has its operating limits fixed. The RAEFileName tag is used for storing the path to the current file of the alarm database. There are also four alarms defined within the System device. The alarms are triggered when the main tag's operating limits are exceeded. A script named Init is defined via the Script Manager. The script is used for setting the file path in the RAEFileName tag. The script is run after project startup. A custom report named Report  basic is defined via the Custom Report Manager. It contains an item named RAEFileName linked to the same-named tag from the System device.

To retrieve data from the database, an object named RAETable is used in the FastReport Designer. Using a FastReport script, the RAETable object's FileName property is set to the value of the RAEFileName item. The appearance of the alarm table is specified through two bands. The top band named PageHeader specifies the column header and the bottom band named MasterData specifies the data to display. To display data in the bands, objects of type TfrxRAEMemoView are used (Alarm Table Column Text object). To configure the displayed table, there are two important properties named RAEDataField and RAETitle in those objects. The RAEDataField property specifies the data field (column) of an alarm's record, the RAETitle property determines whether to display the data field's title instead of data. The RAETitle property is active in the PageHeader band.

At runtime, you can change the main tag's value in the visualization window.
