比如说在每次调用LoadLayout之前都先给arDesigner.Report = new ActiveReport():
- private void loadToolStripMenuItem_Click(object sender, EventArgs e)
- {
- this.arDesigner.Report = new ActiveReport();
- OpenFileDialog od = new OpenFileDialog();
- if (od.ShowDialog() == System.Windows.Forms.DialogResult.OK)
- {
- this.arDesigner.Report.LoadLayout(od.FileName);
- }
- }
复制代码 |