Beispiel #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;
            }
        }
Beispiel #2
0
 public PaginateReportIterator(PageReport paramPageReport)
 {
     this.showReport      = paramPageReport;
     this.reportSettings  = this.showReport.getReportSettings();
     this.columnWidthList = ReportHelper.getColumnWidthList(paramPageReport.ToWorkSheet());
     this.rowHeightList   = ReportHelper.getRowHeightList(paramPageReport.ToWorkSheet());
     dealWithPageInfor();
 }
Beispiel #3
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();
        }
Beispiel #4
0
 public ReportPage(PageReport paramReport, FT[] paramArrayOfFT1, FT[] paramArrayOfFT2)
 {
     this.source_report     = paramReport;
     this.row_line_array    = paramArrayOfFT1;
     this.column_line_array = paramArrayOfFT2;
 }