我使用的以下代码时可以生效的,你参考以下:
- private void Form1_Load(object sender, EventArgs e)
- {
- NewActiveReport1 rpt = new NewActiveReport1();
- rpt.PageSettings.Margins.Top = 3;
- rpt.PageSettings.Margins.Bottom = 3;
- rpt.PageSettings.Margins.Left = 3;
- rpt.PageSettings.Margins.Right = 3;
- rpt.Run();
- this.viewer1.Document = rpt.Document;
- }
复制代码 |