Beispiel #1
0
        public ReportDynamicModel(ReportDynamic reportDynamic)
        {
            reportDynamic = reportDynamic ?? new ReportDynamic();

            // init report
            Init(reportDynamic);

            // get columns
            var reportColumns = ReportColumnServices.GetAll().Where(r => r.ReportId == reportDynamic.Id && !r.IsDeleted).ToList();

            // get report width
            Width = ReportHelper.ReportWidth(PaperKind, Orientation);

            // get header width
            HeaderWidth = ReportHelper.ReportConlumnTypeWidth(reportColumns, ReportColumnType.Header);

            // get header group width
            HeaderGroupWidth = ReportHelper.ReportConlumnTypeWidth(reportColumns, ReportColumnType.HeaderGroup);

            // get detail width
            DetailWidth = ReportHelper.ReportConlumnTypeWidth(reportColumns, ReportColumnType.Detail);

            // get footer group width
            FooterGroupWidth = ReportHelper.ReportConlumnTypeWidth(reportColumns, ReportColumnType.FooterGroup);

            // get footer width
            FooterWidth = ReportHelper.ReportConlumnTypeWidth(reportColumns, ReportColumnType.Footer) - Constant.IndexColumnWidth;
        }