/// <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> /// /// </summary> /// <param name="reportModel"></param> /// <param name="dataTable"></param> /// <param name="reportParameters"></param> /// <returns></returns> public static IReportCreator CreatePageBuilder(IReportModel reportModel, DataTable dataTable, ReportParameters reportParameters) { Console.WriteLine("ReportEngine:CreatePageBuilder_3"); if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (dataTable == null) { throw new ArgumentNullException("dataTable"); } ReportEngine.CheckForParameters(reportModel, reportParameters); IDataManager dataMan = DataManager.CreateInstance(dataTable, reportModel.ReportSettings); if (dataMan != null) { return(DataPageBuilder.CreateInstance(reportModel, dataMan)); } else { throw new MissingDataManagerException(); } }
private void RunDataReport(ReportModel reportModel, IDataManager data) { ILayouter layouter = new Layouter(); IReportCreator reportCreator = DataPageBuilder.CreateInstance(reportModel, data, layouter); reportCreator.SectionRendering += new EventHandler <SectionRenderEventArgs>(PushPrinting); reportCreator.PageCreated += OnPageCreated; reportCreator.BuildExportList(); ShowCompleted(); }
/// <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); IReportCreator builder = DataPageBuilder.CreateInstance(reportModel, dataMan); return(builder); }
private void RunDataReport(ReportModel reportModel, IDataManager data) { IReportCreator reportCreator = DataPageBuilder.CreateInstance(reportModel, data); reportCreator.SectionRendering += new EventHandler <SectionRenderEventArgs>(PushPrinting); reportCreator.GroupHeaderRendering += new EventHandler <GroupHeaderEventArgs>(GroupHeaderRendering); reportCreator.GroupFooterRendering += GroupFooterRendering; reportCreator.RowRendering += new EventHandler <RowRenderEventArgs>(RowRendering); reportCreator.PageCreated += OnPageCreated; reportCreator.BuildExportList(); ShowCompleted(); }
public void RunReport(ReportModel reportModel, IDataManager dataManager) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (dataManager == null) { throw new ArgumentNullException("dataManager"); } // ReportEngine.CheckForParameters(reportModel, parameters); IReportCreator reportCreator = DataPageBuilder.CreateInstance(reportModel, dataManager); BuildExportList(reportCreator); }
public void RunReport(ReportModel reportModel, DataTable dataTable, ReportParameters parameters) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (dataTable == null) { throw new ArgumentNullException("dataTable"); } ReportEngine.CheckForParameters(reportModel, parameters); IDataManager dataManager = DataManagerFactory.CreateDataManager(reportModel, dataTable); IReportCreator reportCreator = DataPageBuilder.CreateInstance(reportModel, dataManager); // reportCreator.SectionRendering += new EventHandler<SectionRenderEventArgs>(PushPrinting); // reportCreator.GroupHeaderRendering += new EventHandler<GroupHeaderEventArgs>(GroupHeaderRendering); // reportCreator.GroupFooterRendering += GroupFooterRendering; // // reportCreator.RowRendering += new EventHandler<RowRenderEventArgs>(RowRendering); reportCreator.BuildExportList(); }
/// <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; if (reportModel.DataModel == GlobalEnums.PushPullModel.FormSheet) { builder = FormPageBuilder.CreateInstance(reportModel); } else { CheckForParameters(reportModel, reportParameters); IDataManager dataMan = DataManagerFactory.CreateDataManager(reportModel, reportParameters); builder = DataPageBuilder.CreateInstance(reportModel, dataMan); } return(builder); }