September 27, 2016 at 8:53 am
I have a report that can vary from 9-20 pages based on the Input date field (parameter) and the first page of it is the Summary page followed by the detailed pages. This report will be printed to PDF and will be sent to different vendors. The requirement is that The first page (summary page) needs to be Portrait mode if the total number of detail pages < 12 and it needs to be in the Landscape mode if the total number of pages >=12. Please let me know if this is possible by any kind of custom code in SSRS.
Thank you
September 28, 2016 at 3:25 am
Although changing the orientation might be possible by simply using a page count, I don't think it's going to provide you with what you want. The issue being is that the position of items in SSRS are quite literal. If you look at the properties of an item in a report, it's position with have a Top and Left value, which are constant.
Changing the Page orientation will not change the position of the items on the report to fit a landscape page. You'd either end up with a large amount of blank space on the right, and items are the bottom being cut in half and migrating to a second page, or your report looking "normal" as you formatted it to display in Portrait.
There might be some kind of extension out there, but I've not seen one on my "travels".
Theoretically, you could create expressions for the sizes and positions of every item in the report, but that is not going to be a quick, or easy, process for you.
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
September 28, 2016 at 5:47 am
Size and position cannot be set by expressions or custom code and even so you'd have to have chosen portrait or landscape at design time so the report will still print in that mode.
There isn't actually any property for portrait or landscape, it is determined by the PageWidth and PageHeight properties, the dialog just adjusts these. These are set at the report level and are also not able to be set by expressions.
Most importantly SSRS does not know the number of pages the report has until it's rendered them so you can't then tell it to go back and change something. It's why using total page numbers in the header or footer prevents SSRS from rendering the first page until the report is fully rendered.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply