reportviewercustom-paging

Custom paging in a ReportViewer report


I have a report which is a list of Order form. For each order form, I would like the paging to be page x of y, where x is the page number of the current order and y and the total page for this order.

All orders are on different pages (no two orders on the same page)

If I can't have page x of y, I would like just page x.

I know I could just generate the reports multiple times for each order, but it seems my boss doesn't like the idea..

Is this even possible and if so how ?

thanks,


Solution

  • Check this procedure:

    1-Drag a textbox to end of each group(of orderid)

    2-In expression of textbox write: =GetPage(orderid)

    3-In code of report page write a vb code that have a counetpage number and when orderid was changed, reset a counetpage and finally return counetpage