Hi everyone,
I am having a problem with page numbers in NAV 2013 reports.
I am using a textbox with the following expression:
="Page " & Globals!PageNumber & "/" & Globals!TotalPages
It works just fine when I print one report at a time, but when I print many reports together, it gives me something like:
Page 1/20, Page 2/20, Page 3/20, etc...as if it was only one document...
How can I fix that???
Thanks in advance
Comments
I outline this in this blog: http://mibuso.com/blogs/clausl/2012/08/08/rdl-vs-rdlc-versions-and-dynamics-nav
You can try to do it like this http://msdn.microsoft.com/en-us/library/dd338694, but note that there is a reason why none of the standard document reports has Page x of z implemented.
It is impossible to do!!! I have several time said that I will give a nice dinner to the person that solves this in NAV 2013. To this day nobody have come with a solution.
We need RDLC 2010 and Visual Studio 2012 to be able reset PageNumber, as explained by Robert Bruckner here: http://blogs.msdn.com/b/robertbruckner/archive/2010/04/25/report-design-reset-page-number-on-group.aspx Reseting PageNumber is not a feature in RDLC 2008 and VS 2010 which is the supported designer in NAV 2013.
So if possible try to avoid this requirement, before it is actual supported by the platform. Hopefully in a future version of NAV we will get support for RDLC 2010 and VS 2012.
/Claus
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
In the book Microsoft Dynamics NAV 2009 Programming Cookbook, page 133, Matt Traxinger first prints the report to PDF and then parses the PDF to get the last page number. He parses it with an automation he creates in Visual Studio.
He then makes the real output using that information to create a "Page X of Y" line.
I think this approach is kind of a mess, but I guess it might be possible to do the same in NAV 2013? (would need dot.net insted of automation to parse it on the server)
1. For each invoice (or whatever you are printing), call the report again filtered on the current document and save it as a temp. PDF. Parse the PDF to get the last page number.
2. Now do the real print out, include the found last page number in the dataset for Visual Studio.
As mentioned - I'm a wanna-bee - but would this approch be possible?
(if we forget it is a mess :-) ).
Regards,
Gert Lynge
/Claus Lundstrøm
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)
Johannes Sebastian
MB7-840,MB7-841
Sound like you've got at pretty good hold of things, to me
Johannes Sebastian
MB7-840,MB7-841
MS NAV Support Engineer have the luxury that they have not signed a NDA, and can therefore talk about future NAV versions \:D/
But I guess if MS NAV Support Engineers are talking about next version in public, all the MVPs are no longer bound by their NDA and can talk about next version???
/Claus Lundstrøm
I'm blogging here:http://mibuso.com/blogs/clausl and used to blog here: http://blogs.msdn.com/nav
I'm also offering RDLC Report Training, ping me if you are interested. Thanks to the 700 NAV developers that have now already been at my training. You know you can always call if you have any RDLC report issues :-)