以下是一个很简单的实现,详细逻辑还需要你补充
- Boolean LayoutChanged = false;
- private void arDesigner_LayoutChanged(object sender, LayoutChangedArgs e)
- {
- LayoutChanged = true;
- }
- private void EndUserDesignerMainForm_FormClosing(object sender, FormClosingEventArgs e)
- {
- if (LayoutChanged && MessageBox.Show("报表已被修改,是否保存?","保存提示",MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes)
- {
- arDesigner.SaveReport("test.xls");
- }
- }
复制代码 |