2
votes

I have a SSRS (.rdl) report with a tablix whose details group is set to put a page break between group items, reset the page number and set the page name (as per http://blogs.msdn.com/b/robertbruckner/archive/2010/04/25/report-design-reset-page-number-on-group.aspx).

This works correctly when rendered to HTML or as a PDF.

When rendered to Word the page numbers do not reset and the page name never changes (the page name is always the value set on the first page). The page breaks work as expected.

I have read (at https://msdn.microsoft.com/en-us/library/dd283105.aspx#ReportHeadersFooters) that complex expressions must be converted into runs of simple expressions in order to display correctly when exporting to Word. I have done this but the problem persists.

Is there any way to make the tablix group reset page number and page name functionality work when exporting to Word?

If not is there a way of achieving the same effect when exporting a report to Word from SSRS?

1
What version of SQL are you using?DeanOC
Currently SQL Server 2008 R2. The server will be migrated to SQL Server 2014 later this year, so a solution that works on 2014 would also be useful.Bruce
I have tested the same functionality with SSDT in VS2015 and SQL Server 2016 CTP 3 and the problem was still present, so a server upgrade alone does not solve the problem.Bruce

1 Answers

0
votes

This is an older question but recently ran into this issue myself so it might help someone else.

There are a lot of examples out there that use casting in the examples for the page number display (CStr or ToString()). Whenever I invoked those methods, the counts would be off when exporting to Word (either doc or docx).

The only way I could get it to work is with three separate text boxes in the footer with these expressions:

=Globals!PageNumber
"of"
=Globals!TotalPages

Avoid the use of those other approaches. Three separate text boxes was the only way I could get this to work.