3
votes

I have some reports that need to be exported to Excel by the users. I'm displaying the page number in the page footer in a text box with this expression: ="Page: " & Globals!PageNumber

When I test this in Visual Studio, the excel sheet I export looks fine. Each page number is correct. When I deploy the report and export it via the Report Manager each page number is "Page: 1".

How do I correct this?

2

2 Answers

0
votes

You must configure the device information settings to use simple headers:

Find the rsreportserver.config file. Mine is located at C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportServer\

Then edit the excel rendering section to use simple headers.

<Extension Name="EXCEL" Type="Microsoft.ReportingServices.Rendering.ExcelRenderer.ExcelRenderer,Microsoft.ReportingServices.ExcelRendering" Visible="False">
  <Configuration> 
    <DeviceInfo>
        <SimplePageHeaders>True</SimplePageHeaders> 
    </DeviceInfo> 
  </Configuration> 
</Extension>
0
votes

See the last 2 paragraphs on this page. To sum up. You have to set the excel device information in the reportserver config file.