views:

513

answers:

2

I have a report in SQL 2005 reporting services. It is a server side report and the width is set to 11 inches and the height is set to 8 inches. When I run in in the VS designer, it works fine. However, when I display it in the report viewer control of my Windows application, it appears in portrait mode, not landscape mode like it should. I have another report that is 14 x 8 inches, and that displays correctly. I can't seem to figure out why the one works and the other does not. Any ideas?

A: 

I believe there is a report property you can set on the RDL that allows you so specify Portrait or Landscape. I don't have VS 2005 any longer, but in VS 2008, just select Report Properties, and it's one of the first options. I would bet it is similar in VS 2005.

Jay Mooney
There is no such option in VS2005.
NYSystemsAnalyst
+2  A: 

The problem turned out to be a bug with Linked Reports. The report I was using was a linked report to another source report. Apparently, when you create a linked report, the properties for the source report that are contained in the ReportServer database (including page size) are not copied to the record for the linked report.

When the server executes the report, instead of reading the properties from the source report when no properties are found on the linked report, it just leaves the properties blank. The viewer then renders the report using the default values for page size, etc. I simply ran an update command against the ReportServer database to copy the properties to the linked report from the source report record.

Another solution to this problem can be found here:

http://blogs.msdn.com/bwelcker/archive/2005/09/07/461758.aspx

NYSystemsAnalyst