Applies To:
  • CitectSCADA 5.xx

Summary:
When Historising a report from within a Cicode block in an RTF report a residual part of the report can remain after the history file is created. This residual forms the begining of the next RTF report when it is run. Passing this new report with the residual component to a Rich Edit Control causes a General Protection Fault. 

Solution:
DevClose() should not be used to historise reports when running Cicode from within an RTF report.

Instead you should create the following Cicode function to execute your reports

FUNCTION MyReport(STRING reportName, STRING reportDeviceName)
    INT hDev;
    STRING deviceFileName;

    Report(reportName);

    hDev = DevOpen(reportDeviceName);
    deviceFileName = DevInfo(hDev, 3);

    WHILE (NOT FileExist(deviceFileName)) DO
        // Wait until the report is created
    END

    DevHistory(hDev);
    DevClose(hDev);
END

 

Keywords:
DevClose Report History Historise RichEditCtrl  

Attachments