Applies To:
  • CitectSCADA 3.xx, 4.xx, 5.xx

When I display my Report on a page based on the Citect File Template only half of the text appears on the page, with the remaining screen appearing blank. I have to use the scroll bar to scroll across the page in order for the missing text to be revealed. How can I utilise the full width of the display window when viewing Reports?  

The solution depends upon which method you are using to display your Reports.

1. If you are using the PageFile() function to display your Report then you will need to create your own version of this function. PageFile() is in the cicode library. Use the steps outlined in KB Q2108 to create your own function, but replace the fourth parameter in the line: DspFile(21, DspFontHnd("TextFont"), 24, 95); with the desired window width, in characters.

2. If you are using low level animation functions to display your report: For example you are calling PageDisplay("File");DspFileSetName(21, "[data]:replog.001");WinTitle("Report") from a button; then you will need to modify some cicode called from an Advanced Animation on the normal file Template.

The File template, commonly used to create pages on which to display reports, runs a cicode function called TextFileRun() from an Advanced Animation at AN21. This function determines the screen attributes for displaying a text file. The function DspFile() defines a window where the file will be displayed. The width of the file display window is currently set to 95 characters. This roughly equates to the width of a page created at VGA resolution. If you are using templates with higher resolutions the display window needs to be increased.

You can either edit the existing TextFileRun() located in the Library (Warning: it will be overwritten if you reinstall or upgrade your Citect) or create your own function based on this one, and modify the fourth parameter of the DspFile() function appropriately. If you choose the latter option, which is preferred, then call your own function from AN21 instead of TextFileRun().

TextFileRun(INT hAn = 21, INT NoLines = 24)
   IF StrToInt(PageInfo(7)) = 0 THEN
      DspFile(hAn, DspFontHnd("TextFont"), NoLines, 95);

See Also KB Q2108