I am using Microsoft report (.rdl), I have changed its layout to landscape in report properties. It shows landscape in report viewer but when I save it to pdf through report viewer or by programatically, It didn't save pdf in landscape. It saves pdf in portrait and render one page report to multiple pages.
Asked
Active
Viewed 1,753 times
3 Answers
2
Are you sure your report is sized correctly to fit in a landscape page dimensions? Take a look at the answer to this question for some tips on PDF formatting:

Community
- 1
- 1

Nathan Griffiths
- 12,277
- 2
- 34
- 51
1
All you have to do is alternate the report width and height in Report Properties. If you want it on A4 sheet, then give width=29cm and height=21cm.

oceanexplorer
- 1,209
- 3
- 11
- 24
0
You can also modify the PageHeight and PageWidth in the DeviceInfo settings.
Example:
string deviceInfo =
"<DeviceInfo>" +
" <OutputFormat>PDF</OutputFormat>";
if (!landscape)
{ // display report in portrait
deviceInfo +=
" <PageWidth>8.5in</PageWidth>" +
" <PageHeight>11in</PageHeight>";
}
else // display report in Landscape
{
deviceInfo +=
" <PageWidth>16in</PageWidth>" +
" <PageHeight>8.5in</PageHeight>";
}
deviceInfo +=
" <MarginTop>0.5in</MarginTop>" +
" <MarginLeft>0.5in</MarginLeft>" +
" <MarginRight>0.5in</MarginRight>" +
" <MarginBottom>0.5in</MarginBottom>" +
"</DeviceInfo>";

Jason Robinson
- 923
- 9
- 11