Retrieving current page number and total pages from Crystal Report
一般情况会显示1/1+
想显示最大页数的时候
可以设置下面的属性
Showallpageids
但是有时候不起作用
因为找个属性必须在report里面引入了特殊字段【 页数n/m】才有效果
It is possible to show both Current Page and Total No of page in Crystal Report Page Header. usuallly it shows 1/1+ . To show Current page / Total No of page: Go To Your Solution Field Explorer->Special Fields From here Drag "Page N of M" To you Crystal Report. That's it. It will work for u. No need to do any extra coding for it. 当然在代码里先showlastpage一下也有效果
但是翻页的话就要自己控制了
当前页数
CrystalDecisions.Web.ViewInfo vi = crViewer.ViewInfo; pagenum.Text = vi.PageNumber + " of " + vi.LastPageNumber; |