In this blog we will discuss a workaround that can be used to show some of pages of the report in Portrait Orientation while some in Landscape Orientation. The approach is simple :
- Create two reports where one of reports shows the pages in Portrait orientation and the other report in Landscape orientation.
- Finally, merge both the reports together to show both the orientations within the same report.
The pages can be added at the end or in between the report using the Add or Insert method of PagesCollection Class. Please refer to the following code snippet :
'To add the pages at the end : rpt.Document.Pages.Add(rpt2.Document.Pages(0)) 'To insert the pages in between : rpt.Document.Pages.Insert(0, rpt2.Document.Pages(0))
The attached sample shows how the pages can be added either at the end or inserted at the alternative position in the report. Once the pages are inserted alternatively, the resultant report would look like the following :
Refer to the attached samples for the complete implementation :
Download Sample : CSharp
Download Sample : VB
You may also refer to the following documentation link for more information :
How to : Insert or Add Pages