Cicode Programming Reference > Cicode Function Categories > Trend Functions Introduction > TrnPrint


Prints the trend that is displayed on the screen (at AN) using the current display mode for each trend. You can specify the trend title, the target printer, whether to print in color or black and white, and whether to display the Plot Setup form when the function is called.


TrnPrint(sPort, sTitle, AN, iModeColor, iDisplayForm)


The name of the printer port to which the plot will be printed. This name needs to be enclosed within quotation marks "". For example "LPT1:", to print to the local printer, or "\\Pserver\canon1" using UNC to print to a network printer.

It is not necessary to enter a printer port. The first time the printer port is omitted, you will be prompted to select one at the Printer Setup form. The selection you make will then be used as the default.


The title to print at the top of the trend plot. If you omit the title in sTitle, the page title will be used.


The AN where the trend plot is located.


The color mode of the printer.

-1 - Color to be decided (Default). CitectSCADA refers to the [GENERAL]PrinterColorMode parameter to determine print color. If there is no setting for this parameter, it will default to black and white.

0 - Black and White

1 - Color


Defines whether or not the Plot Setup form will display when the function is called. This form allows you to enter the color mode of the printer, and define the printer setup etc. (See Printing Trend Data for more information on this form.)

-1 - CitectSCADA refers to the [GENERAL]DisablePlotSetupForm parameter to determine if the form will display.

0 - Do not display form

1 - Display form

Return Value

0 (zero) if successful, otherwise an error is returned.

Related Functions

TrnPlot, TrnComparePlot, WinPrint, SPCPlot


TrnPrint("LPT1:","Test Print",40,0,0);
/* Prints the trend plot displayed at AN40, without prompting for setup details.*/

See Also

Trend Functions