1

I'm working on SSRS Reports.

Currently I am facing one issue. I have two tablix in a single Report. Now, Tablix1 or Tablix2 will be visible in either condition.

For example: I am passing One Flag as True then Tablix1 should be visible and for this layout would be Landscape and I am passing Flag Value as False then Tablix2 should be visible and for that layout would be Portrait.

For Show/Hide Tablix I am having solution but what about orientation?

How can I achieve this in SSRS Reports? Can anyone please help me or guide me?

Thanks in advance!!

Pedram
  • 6,256
  • 10
  • 65
  • 87

1 Answers1

3

I can only answer this question in regard to 2012, but it is not possible to achieve this with a single report. Please see my caveat below. In SSRS, you have two properties that determine the size of the report and where breaks should occur. InteractiveSize determines the size of the page when viewed in interactive formats (i.e., RDL or MHTML4.0). For all other report formats (e.g., Word, PDF, Excel, CSV), the PageSize determines the size of the page when viewed in those non-interactive formats.

In SSRS 2012 as well as earlier versions, expressions are not accepted in the InteractiveSize or PageSize fields. This means you cannot reference variables or parameters or field values.

Caveat

I took an existing report I had created with a page size of 8.5" (width) by 11" (height) that is normally two or three pages wide. I then created a blank report and added an 11" x 8.5" subreport pointing to my original report. When I exported this to PDF, I got an 11" (wide) by 8.5" (tall) PDF with the spacing and page breaks as you would expect for a landscape document. However, when I exported to Word, Microsoft Word crashed and burned. This may have something to do with the fact that the PDF exporter uses hard page breaks and the Word exporter uses soft page breaks. In any event, depending on what you need, you may be able to use a single report (i.e., a single place where the logic and datasets are set up once only) and then reference that report as a subreport elsewhere with a different page size. Just be sure to thoroughly test the result in any allowed export formats.

I hope this helps!

Christopher Brown
  • 2,170
  • 1
  • 13
  • 19