public BaseConverter(IReportModel reportModel,IDataNavigator dataNavigator,ExporterPage singlePage) { if (dataNavigator == null) { throw new ArgumentNullException("dataNavigator"); } if (singlePage == null) { throw new ArgumentNullException("singlePage"); } this.ReportModel = reportModel; this.SinglePage = singlePage; this.DataNavigator = dataNavigator; this.Layouter = (ILayouter)ServiceContainer.GetService(typeof(ILayouter)); this.Evaluator = EvaluationHelper.CreateEvaluator(this.SinglePage,this.DataNavigator); }
protected void InitNewPage() { bool firstPage; if (this.Pages.Count == 0) { firstPage = true; } else { firstPage = false; } this.ReportModel.ReportSettings.LeftMargin = this.ReportModel.ReportSettings.LeftMargin; var sectionBounds = new SectionBounds(this.ReportModel.ReportSettings, firstPage); this.SinglePage = ExporterPage.CreateInstance(sectionBounds, this.pages.Count + 1); if (this.EvaluatorFacade == null) { EvaluatorFacade = EvaluationHelper.CreateEvaluator(SinglePage, SinglePage.IDataNavigator); } EvaluatorFacade.SinglePage = this.SinglePage; }