Search code examples
reporting-servicesssrs-2016

Default Orientation of Linked Reports


tldr; When creating a linked report to a report that has its default orientation set to "Landscape" the default orientation of the linked report is "Portrait" in some report server environments, but not all.

I have a report on my report server. The default orientation is set to "Landscape":

Report Builder properties of base report

When I execute this report on the report server, and click the print button, it defaults to "Landscape" as expected:

Printing of base report

I hide this report and create a linked report that points to it. When I execute the linked report and click the print button, it defaults to "Portrait":

enter image description here

Linked Reports do not have orientation properties that can be explicitly set, so I would expect that they would inherit the orientation properties of the base report they point to. Is that not the case?

Furthermore, the behavior described above occurs in our Production environment, and in our QA/Stage environment, but not in our Dev environment. In Dev, the print button defaults to "Landscape" for the linked report, as expected.

Is there a server-level setting I'm not aware of that sets default orientation of linked reports on that server? My Googling didn't turn up anything.

There is one configuration difference in the two sets of environments. Our DEV environment is a single-server environment, whilst our STG and PRD environments are both load-balanced. But I don't find anything on the interwebs indicating that that would be expected to matter.

Any other possible explanations or solutions?


Solution

  • I'm not sure how it is working in one environment but not another. All my environments are single server and I still see the same issues as you are facing.

    If you look in the catalog table ReportServer.dbo.catalog you'll see the linked report has no properties in the Property column.

    In my example, I setup a report to be A4 Landscape and then created a linked report. The original report's default print settings were A4 landscape as expected but the linked report's default print settings were Letter Portrait, I'm guessing because the server was originally setup as US (not UK as it should have been!) so not only is the orientation not being preserved, the page size is also ignored.

    As an experiment, I copied the properties from the base report to the linked report manually using this...

    UPDATE a
        SET Property = b.Property
        FROM [Catalog] a 
         JOIN (SELECT * FROM [Catalog] where Name in ('ParentReportName')) b 
            ON  a.LinkSourceID = b.ItemID
        WHERE a.Name in ('LinkedReportName')
    

    After that, I re-opened the linked report, hit print and the correct page size was shown as default.

    I guess this is just a bug that's been around forever and nobody noticed/cared but I suppose you could - carefully - update the linked report's Property using something similar to above.