/// <summary> /// /// </summary> /// <param name="reportModel"></param> /// <param name="list"></param> /// <param name="reportParameters"></param> /// <returns></returns> public static IReportCreator CreatePageBuilder(IReportModel reportModel, IList list, ReportParameters reportParameters) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (list == null) { throw new ArgumentNullException("list"); } ReportEngine.CheckForParameters(reportModel, reportParameters); IDataManager dataMan = DataManager.CreateInstance(list, reportModel.ReportSettings); if (dataMan != null) { Layouter layouter = new Layouter(); return(DataPageBuilder.CreateInstance(reportModel, dataMan, layouter)); } else { throw new MissingDataManagerException(); } }
/// <summary> /// For internal use only /// </summary> /// <param name="reportModel"></param> /// <returns></returns> public static IReportCreator CreatePageBuilder(IReportModel reportModel) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } IDataManager dataMan = DataManagerFactory.CreateDataManager(reportModel, (ReportParameters)null); Layouter layouter = new Layouter(); IReportCreator builder = DataPageBuilder.CreateInstance(reportModel, dataMan, layouter); return(builder); }
public static AbstractRenderer Create(IReportModel model,IDataManager container) { ReportDocument repDocumet = new ReportDocument(); if (model != null) { Layouter layouter = new Layouter(); switch (model.ReportSettings.ReportType) { case GlobalEnums.ReportType.FormSheet :{ return new RenderFormSheetReport(model,repDocumet,layouter); } case GlobalEnums.ReportType.DataReport:{ return new RenderDataReport(model,container,repDocumet,layouter); } } } throw new MissingModelException(); }
public static AbstractRenderer Create(IReportModel model, IDataManager container) { ReportDocument repDocumet = new ReportDocument(); if (model != null) { Layouter layouter = new Layouter(); switch (model.ReportSettings.ReportType) { case GlobalEnums.ReportType.FormSheet: { return(new RenderFormSheetReport(model, repDocumet, layouter)); } case GlobalEnums.ReportType.DataReport: { return(new RenderDataReport(model, container, repDocumet, layouter)); } } } throw new MissingModelException(); }
/// <summary> /// Use this method for pullData and FormSheet /// </summary> /// <param name="fileName"></param> /// <param name="reportParameters">null if no parameters are used</param> /// <returns><see cref="BasePager"</returns> public static IReportCreator CreatePageBuilder(string fileName, ReportParameters reportParameters) { if (String.IsNullOrEmpty(fileName)) { throw new ArgumentNullException("fileName"); } IReportModel reportModel = LoadReportModel(fileName); IReportCreator builder = null; Layouter layouter = new Layouter(); if (reportModel.DataModel == GlobalEnums.PushPullModel.FormSheet) { builder = FormPageBuilder.CreateInstance(reportModel, layouter); } else { CheckForParameters(reportModel, reportParameters); IDataManager dataMan = DataManagerFactory.CreateDataManager(reportModel, reportParameters); builder = DataPageBuilder.CreateInstance(reportModel, dataMan, layouter); } return(builder); }
/// <summary> /// /// </summary> /// <param name="reportModel"></param> /// <param name="list"></param> /// <param name="reportParameters"></param> /// <returns></returns> public static IReportCreator CreatePageBuilder (IReportModel reportModel, IList list, ReportParameters reportParameters) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (list == null) { throw new ArgumentNullException("list"); } ReportEngine.CheckForParameters(reportModel,reportParameters); IDataManager dataMan = DataManager.CreateInstance(list,reportModel.ReportSettings); if (dataMan != null) { Layouter layouter = new Layouter(); return DataPageBuilder.CreateInstance(reportModel,dataMan,layouter); } else { throw new MissingDataManagerException(); } }
/// <summary> /// For internal use only /// </summary> /// <param name="reportModel"></param> /// <returns></returns> public static IReportCreator CreatePageBuilder (IReportModel reportModel) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } IDataManager dataMan = DataManagerFactory.CreateDataManager(reportModel,(ReportParameters)null); Layouter layouter = new Layouter(); IReportCreator builder = DataPageBuilder.CreateInstance(reportModel, dataMan,layouter); return builder; }
/// <summary> /// Use this method for pullData and FormSheet /// </summary> /// <param name="fileName"></param> /// <param name="reportParameters">null if no parameters are used</param> /// <returns><see cref="BasePager"</returns> public static IReportCreator CreatePageBuilder (string fileName, ReportParameters reportParameters) { if (String.IsNullOrEmpty(fileName)) { throw new ArgumentNullException("fileName"); } IReportModel reportModel = LoadReportModel (fileName); IReportCreator builder = null; Layouter layouter = new Layouter(); if (reportModel.DataModel == GlobalEnums.PushPullModel.FormSheet) { builder = FormPageBuilder.CreateInstance(reportModel,layouter); } else { CheckForParameters(reportModel,reportParameters); IDataManager dataMan = DataManagerFactory.CreateDataManager(reportModel,reportParameters); builder = DataPageBuilder.CreateInstance(reportModel, dataMan,layouter); } return builder; }