Applies To:
  • CitectSCADA x.x

Summary:
Question: I have a report set up, which has only a call to cicode in it. e.g

{CICODE}
MyReportFunction();
{END}

My cicode function uses PrintLn() to print to the report device. e.g.

FUNCTION MyReportFunction()
   PrintLn("This is a line");
END

Why does my report spool, but not actually print when I run that report, until I shutdown citect?


Solution:
This problem occurs only if the rest of the report is empty, because PrintLn opens the device, it is not opened automatically when the report is run. Putting some text in the report or adding the following lines to the cicode after the last PrintLn() will fix this problem;

IF StrToInt(DevInfo(DevCurr(), 11)) = 0 THEN
   _DevClose(DevCurr(), 1);
END

 

Keywords:
 

Attachments