开发者

ReportViewer page orientation

How can we

  1. change Page Orientation to landscape

  2. set Reportviewer to Leg开发者_JAVA百科al Page Size or A4.

Thanks


You can create a PageSettings object, set the properties of that to landscape A4 paper size, and assign that to the Report Viewer instance. For example:

System.Drawing.Printing.PageSettings ps = new System.Drawing.Printing.PageSettings();
ps.Landscape = true;
ps.PaperSize = new System.Drawing.Printing.PaperSize("A4", 827, 1170);
ps.PaperSize.RawKind = (int)System.Drawing.Printing.PaperKind.A4;
reportViewer.SetPageSettings(ps);


I tried this a couple of years back. The 'easiest' way to change orientation was simply change the size. (i.e: portrait A4 is 210 × 297 mm and landscape is 297 x 210 mm)


if you are using visual studio 2012 you can go to report property, page setup then you can choose the orientation of the page.


Finding that report property was a pain for me because I could not see that "wrench" icon on the reporting bar (which can be open by right clicking on an empty area at the header and clicking "Reports".

Once you get there, change the Orientation to landscape.


Easy: In properties (right click - report properties) change the page orientation. And resize the report design to 11 inches width, you can use the ruler (right click - view - ruler) to do it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜