在ReportViewer 2008中更改页面设置 [英] Change pagesettings in ReportViewer 2008

查看:165
本文介绍了在ReportViewer 2008中更改页面设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有一个使用Visual Studio 2010的Report Viewer 2008以编程方式生成的报告.ShowPrintButton 设置为``True''启用了工具栏.

单击打印按钮后,将生成报告.我需要根据用户要求更改页面设置,以将布局更改为"风景"或"人像".

谢谢

Hi,

I have a report generated programmatically with Report Viewer 2008 using Visual Studio 2010.The toolbar is enabled with ShowPrintButton set to ''True'' .

When the print button is clicked, report is generated. I need to change the page settings to change the layout to ''landscape'' or ''portrait'' based on users requirement.

Thanks

推荐答案

尝试以下方法:
Try something along the lines of:
LocalReport myReport = new LocalReport();
ReportPageSettings repPgSettings = myReport.GetDefaultPageSettings();

//Flip the page
double height = repPgSettigs.PaperSize.Height;
repPgSettigs.PaperSize.Height = repPgSettigs.PaperSize.Width;
repPgSettigs.PaperSize.Width = height;


这篇关于在ReportViewer 2008中更改页面设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆