回复 5楼pmway的帖子
加载报表的时候设置PageSetting.PaperName 属性为英文既可以解决这个问题:
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- SectionReport sr = new SectionReport();
- sr.LoadLayout(this.Server.MapPath("fffffff.rpx"));
- string paperKind = sr.Document.Printer.PaperKind.ToString();
- int height = Convert.ToInt32(sr.Document.Printer.PaperHeight*100);
- int width = Convert.ToInt32(sr.Document.Printer.PaperWidth * 100);
- sr.PageSettings.PaperName = "Custom paper";
- sr.Document.Printer.PrinterName = "";
- System.Drawing.Printing.PaperSize ps = new System.Drawing.Printing.PaperSize(paperKind, width, height);
- ps.RawKind = 9;
- sr.Document.Printer.PaperSize = ps;
- sr.Run();
- this.WebViewer1.Report = sr;
- }
复制代码 |