Unknown Country

There is an oversight in the documentation of the new client print functionality of Reporting Services Service Pack 2. SP2 has a new behavior that extracts the page size and margin information at report publishing time so that it can be used by the print control. If you look at the Property column of the Catalog table in the ReportServer database, you will see the following on a report published with SP2:


Reports that were published before SP2 do not contain these properties so they will default to 8.5" x 11" (portrait) with .5" margins. You can either set these properties by republishing the report definition through Report Manager or via the SetReportDefintion method in the Web Services API. Below is a script that you can use with the Reporting Services script host (rs.exe) to republish all reports on the server:

Public Sub Main()
Dim definition As [Byte]() = Nothing
Dim item As CatalogItem = Nothing
Dim items() As CatalogItem = Nothing

    rs.Credentials = System.Net.CredentialCache.DefaultCredentials

    items = rs.ListChildren("/", True)

    For Each item In items
If item.Type = ItemTypeEnum.Report Then
Console.WriteLine("Republishing Report: {0}", item.Path)
definition = rs.GetReportDefinition(item.Path)
rs.SetReportDefinition(item.Path, definition)
End If
End Sub