Exemple #1
0
 public RptRoot()
 {
     Params      = new RptParams(this);
     Data        = new RptDataSource(this);
     PageSetting = new RptPageSetting(this);
     Header      = new RptHeader(this);
     Body        = new RptBody(this);
     Footer      = new RptFooter(this);
     ViewSetting = new RptViewSetting(this);
 }
Exemple #2
0
        /// <summary>
        /// 重新刷新页面设计部分的分割线高度。
        /// PaperSize 的一个值为0的时候,不会在页面上画线
        /// </summary>
        public void RefreshSpliter()
        {
            RptPageSetting setting    = Info.Root.PageSetting;
            double         headHeight = Info.Root.Header.ActualHeight;
            double         footHeight = Info.Root.Footer.ActualHeight;
            double         newHeight  = setting.ValidHeight - headHeight - footHeight;
            double         newWidth   = setting.ValidWidth;

            if (newHeight > 0 && newWidth > 0)
            {
                _excel.PaperSize = new Size(newWidth, newHeight);
            }
        }