private void DefinePageFooter() { Report.InsertPageFooter(); //插入一个系统变量框,显示页号 IGRSystemVarBox PageNoBox = Report.PageFooter.Controls.Add(GRControlType.grctSystemVarBox).AsSystemVarBox; PageNoBox.SystemVar = GRSystemVarType.grsvPageNumber; PageNoBox.TextAlign = GRTextAlign.grtaMiddleRight; PageNoBox.Left = 12.78; PageNoBox.Top = 0; PageNoBox.Width = 1.40; PageNoBox.Height = 0.40; //插入一个静态文本框,显示页号与总页数中间的分隔斜线字符'/' IGRStaticBox StaticBox = Report.PageFooter.Controls.Add(GRControlType.grctStaticBox).AsStaticBox; StaticBox.Text = "/"; StaticBox.TextAlign = GRTextAlign.grtaMiddleCenter; StaticBox.Left = 14.18; StaticBox.Top = 0; StaticBox.Width = 0.40; StaticBox.Height = 0.40; //插入另一个系统变量框,显示页数 IGRSystemVarBox PageCountBox = Report.PageFooter.Controls.Add(GRControlType.grctSystemVarBox).AsSystemVarBox; PageCountBox.SystemVar = GRSystemVarType.grsvPageCount; PageCountBox.Left = 14.58; PageCountBox.Top = 0; PageCountBox.Width = 1.40; PageCountBox.Height = 0.40; }