Пример #1
0
        private void ResolveReport(Report report, Hashtable parameters)
        {
            try
            {
                SheetView    sheetView    = (SheetView)Serializer.LoadObjectXml(typeof(SheetView), Serializer.GetObjectXml(report.ReportSheet, "SheetView"), "SheetView");
                ReportEngine reportEngine = new ReportEngine(report.Configuration.DataSources, sheetView, parameters);
                PageReport   pageReport   = reportEngine.execute();

                PaginateReportIterator iterator = pageReport.generateReportPageIterator();

                DynamicValueList ColumnWidthList = ReportHelper.getColumnWidthList(pageReport.ToWorkSheet());
                DynamicValueList RowHeightList   = ReportHelper.getRowHeightList(pageReport.ToWorkSheet());

                DrawingOP drawingOP = new DrawingOP(this, pageReport, RowHeightList, ColumnWidthList);
                while (iterator.hasNext())
                {
                    ReportPage reportPage = iterator.next() as ReportPage;
                    drawingOP.DrawReport(reportPage);
                }
            }
            catch (Exception ex)
            {
                Report.Reset();
                Report.ColumnCount         = 6;
                Report.RowCount            = 2;
                Report.RowHeaderVisible    = false;
                Report.ColumnHeaderVisible = false;
                Report.Columns[0].Width    = 700;
                Report.Rows[0].Height      = 500;
                Report.Cells[0, 0].Text    = "报表解析出错:" + ex.Message;
            }
        }
Пример #2
0
        public DrawingOP(ReportPanel reportPanel, PageReport pageReport, DynamicValueList rowHeightList, DynamicValueList columnWidthList)
        {
            this.reportPanel     = reportPanel;
            this.pageReport      = pageReport;
            this.iterator        = pageReport.generateReportPageIterator();
            this.PageRectangles  = new Rectangle[iterator.PageRowCount, iterator.PageColumnCount];
            this.rowHeightList   = rowHeightList;
            this.columnWidthList = columnWidthList;

            DoPageInfo();
        }
Пример #3
0
        public PaginateReportIterator generateReportPageIterator()
        {
            PaginateReportIterator localPaginateReportIterator = new PaginateReportIterator(this);

            return(localPaginateReportIterator);
        }
Пример #4
0
 public PageGenerateThread(PaginateReportIterator paramPaginateReportIterator)
 {
     this.iterator = paramPaginateReportIterator;
 }