示例#1
0
 /// <summary>
 /// 设计时若自动保存出发事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void m_frm_ReportStateChanged(object sender, ReportStateEventArgs e)
 {
     ReportUtil.DataSource = _templateSource;
     if (e.ReportState == ReportState.Changed)
     {
         if (m_Save2File)
         {
             XRDesignFormExBase frm = sender as XRDesignFormExBase;
             frm.SaveReport(frm.FileName);
         }
     }
 }
示例#2
0
 /// <summary>
 /// 设计时若自动保存出发事件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void m_frm_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     if (!m_FromStream)
     {
         XRDesignFormExBase frm = sender as XRDesignFormExBase;
         frm.SaveReport(frm.FileName);
     }
     else
     {
         ReportUtil.ReportStream = new MemoryStream();
         ReportUtil.CurrentReport.SaveLayout(ReportUtil.ReportStream);
     }
 }