web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / Think about IT / Page X of Y in NAV 2013 R2

Page X of Y in NAV 2013 R2

Steven Renders Profile Picture Steven Renders 5,690 Moderator

In Dynamics NAV 2013 R2 it is now possible, again, to implement Page X of Y for document reports.

PageXofY

In previous versions of RDLC the problem was that in a typical document report the content of the body was put in a List container to implement the Number Of Copies option. Via the List we then grouped the Body on the OutputNo variable. To be able to calculate the page number we then had to use complex expressions because of the fact that we had to reset it for every new copy. And there was no solution to calculate and reset the total pages.

In RDLC 2010 there is a simple solution. Let’s he how it works.

Basically we will be using a new property introduced in RDLC 2010 in the group properties of a List data region: ResetPageNumber

PageXofY2

To do this follow these steps:

  1. select the List control in the body of your document report
  2. select the group in the Row Groups window
  3. open the Properties
  4. enable ResetPageNumber.

This means that when the group encounters a new OutPutNo it will reset the page numbers (PageNumber and TotalPages).

Then you can just use these in the Header of the report as shown here:

PageXofY3

In this example we are using a replace function to replace the placeholders %1 and %2 in the PageCaption and show the result.

And voila, you’re done.

Nice, isn’t it?


This was originally posted here.

Comments

*This post is locked for comments