Cicode Programming Reference > Cicode Function Categories > Page Functions Introduction > PageTrendEx


Displays a trend page of a specified cluster in a multi-cluster system with the specified trend pens. Use this function to display trends in a mult-cluster system with a single trend page. You need to create the trend page with the Graphics Builder and set the pen names to blank. Then display that page by calling this function and passing the required trend tags. Call this function from a menu of trend pages. This function can also be used in a single cluster system, the sCluster argument is optional in such a case.

Note: Because you cannot mix templates in a project, PageTrendEx will not work if you have included the CSV_Include project in your project. For example, if your project includes the CSV_Include project, PageTrend("pagename", "trendtag") only works on trend pages based on XP-style templates (that is, "Trend"). When using PageTrend to go to a page based on a standard template (for example, "SingleTrend"), the page displays, but no trend tag is added. This also applies for the CSV_Trend_Page function.

This function is not supported in the server process in a multiprocessor environment. Calling this function from the server process results in a hardware alarm being raised.


PageTrendEx(sPage, sCluster, sTag1 [, sTag2..sTag8] )


Name of the trend page (drawn with the Graphics Builder).


Name of the cluster in which the trend page is located.


The first trend tag to display on the page.


Optionally trend tags 2 to 8 to display on the page.

Return Value

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

Note: Before CitectSCADA version 5.0, page records could be edited in the Project Editor. One of the fields available for configuration was "Page Number". The value entered for a page could then be used in runtime with the Page Cicode functions such as PageDisplay(), PageGoto(), and PageInfo(1).
For example, PageDisplay("1") can be used to display the page that has "1" (without the quotes) set in the Page Number field. PageInfo(1) returns the Page Number of the current page.
From version 5.0 on, this feature is only backwards-supported. The "Alias" field in the project Pages.DBF file still contains the Page Numbers from upgraded projects; however, the Pages database records are no longer available for direct editing in CitectSCADA.

Related Functions

TrnNew, TrnSelect, TrendWin, TrendPopUp, PageTrend




Process Trend


PageTrendEx("MyTrend", "MyCluster", "PV1", "PV2", "PV3")


Display the trend page on the specified cluster with three trend pens

PageTrendEx("MyTrend", "MyCluster", "PV1", "PV2", "PV3")
/* Display three trend tags on a single trend page on the specified cluster. */

See Also

Page Functions