Gets or sets the current page number.

Namespace:  C1.C1Report
Assembly:  C1.C1Report.2 (in C1.C1Report.2.dll)

Syntax

Remarks

This property is a global variable available to VBScript expressions.

It is automatically initialized by the control with the value 1 when a report starts rendering, and it is automatically incremented after each page break.

This property is read-write, so you can reset it using scripts. For example, you can reset the current page to 1 whenever a new group starts rendering.

Examples

For example, the following code creates a field in the page footer section that displays a "Page n of m" counter (note this can also be done using the Designer):

Copy CodeVisual Basic
c1r.Sections(SectionTypeEnum.PageFooter).Fields.Add ("PageCounterFld", "="Page " & Page & " of " & Pages", 5000, 0, 5000, 300)
c1r.Fields("PageCounterFld").Calculated = True
Copy CodeC#
c1r.Sections(SectionTypeEnum.PageFooter).Fields.Add ("PageCounterFld", "="Page " + Page + " of " + Pages", 5000, 0, 5000, 300);
c1r.Fields("PageCounterFld").Calculated = true;

See Also