Problem with TotalPages when printing more than one report

poppins
Member Posts: 647
Hi everyone,
I am having a problem with page numbers in NAV 2013 reports.
I am using a textbox with the following expression:
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
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

0
Comments
-
There is no fix for this in NAV 2013. So if you customer requires this, you run away.
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.
/ClausClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
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 :-)0 -
A NAV developer wanna-bee is brainstorming. Bear with me :-)
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 Lynge0 -
Yes this should be possible, but like you, I don't like this solution. It's over engineering for something that should be easy to do.
/Claus LundstrømClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
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 :-)0 -
Yes, in a workshop with a MS NAV Support Engineer as instructor, I was told this was an upcoming feature when RDL2010 is supported.Best regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410 -
lynge wrote:A NAV developer wanna-bee is brainstorming. Bear with me :-)
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
Sound like you've got at pretty good hold of things, to meBest regards / Venlig hilsen
Johannes Sebastian
MB7-840,MB7-8410 -
Johannes Nielsen wrote:Yes, in a workshop with a MS NAV Support Engineer as instructor, I was told this was an upcoming feature when RDL2010 is supported.
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ømClaus Lundstrøm | MVP | Senior Product Manager | Continia.com
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 :-)0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions