gpt4 book ai didi

pdf - 报表查看器横向 pdf 导出

转载 作者:行者123 更新时间:2023-12-04 05:44:34 26 4
gpt4 key购买 nike

如何为 pdf 导出设置景观?

在刷新前使用 System.Drawing.Printing.PageSettings 不起作用。

        Type tip = reportViewer1.GetType();
FieldInfo[] pr = tip.GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
System.Drawing.Printing.PageSettings ps = new System.Drawing.Printing.PageSettings();
ps.Landscape = true;

// ps.PaperSource=
foreach (FieldInfo item in pr)
{
if (item.Name == "m_pageSettings")
{
item.SetValue(reportViewer1, ps);

}
}

最佳答案

在报表的设计 View ( rdlc ) 中选择报表并在属性 Pane 中在 page size 中设置以下项目

width :11in
height :8.5in

关于pdf - 报表查看器横向 pdf 导出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1081538/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com