Пример #1
0
		public static IReportGenerator Create (ReportModel model,ReportStructure reportStructure)			                                     
		                                       
		{	
			IReportGenerator reportGenerator = null;
				switch (model.DataModel) {
				case GlobalEnums.PushPullModel.PullData:
					reportGenerator = new GeneratePullDataReport(model,reportStructure);
					break;
				case GlobalEnums.PushPullModel.PushData:
					reportGenerator = new GeneratePushDataReport(model,reportStructure);
					break;
				case GlobalEnums.PushPullModel.FormSheet:
					reportGenerator = new GenerateFormSheetReport (model,reportStructure);
					break;
			}
			return reportGenerator;
		}
Пример #2
0
		public static IReportGenerator Create (ReportModel model,		                                     
		                                       Properties customizer)
		{	
			IReportGenerator reportGenerator = null;
				switch (model.DataModel) {
				case GlobalEnums.PushPullModel.PullData:
					reportGenerator = new GeneratePullDataReport(model,customizer);
					
					break;
				case GlobalEnums.PushPullModel.PushData:
					reportGenerator = new GeneratePushDataReport(model,customizer);
					break;
				case GlobalEnums.PushPullModel.FormSheet:
					reportGenerator = new GenerateFormSheetReport (model,customizer);
					break;
			}
			return reportGenerator;
		}
Пример #3
0
		private ReportModel CreateModel ()
		{
			ReportModel m = ReportModel.Create();
			Properties customizer = new Properties();
			
			customizer.Set("ReportLayout",GlobalEnums.ReportLayout.ListLayout);
			IReportGenerator generator = new GenerateFormSheetReport(m,customizer);
			generator.GenerateReport();
			
			ReportLoader rl = new ReportLoader();
			object root = rl.Load(generator.XmlReport.DocumentElement);
			ReportModel model = root as ReportModel;
			if (model != null) {
				model.ReportSettings.FileName = GlobalValues.PlainFileName;
				FilePathConverter.AdjustReportName(model);
			} else {
				throw new InvalidReportModelException();
			}
			return model;
		}
		private ReportModel CreateModel ()
		{
			ReportModel m = ReportModel.Create();

			ReportStructure reportStructure = new ReportStructure()
			{
				ReportLayout = GlobalEnums.ReportLayout.ListLayout
			};
			
			IReportGenerator generator = new GenerateFormSheetReport(m,reportStructure);
			generator.GenerateReport();
			
			ReportLoader loader = new ReportLoader();
			object root = loader.Load(generator.XmlReport.DocumentElement);
			
			ReportModel model = root as ReportModel;
			
			model.ReportSettings.FileName = GlobalValues.PlainFileName;
			FilePathConverter.AdjustReportName(model);
			return model;
		}
Пример #5
0
        public static IReportGenerator Create(ReportModel model, ReportStructure reportStructure)

        {
            IReportGenerator reportGenerator = null;

            switch (model.DataModel)
            {
            case GlobalEnums.PushPullModel.PullData:
                reportGenerator = new GeneratePullDataReport(model, reportStructure);
                break;

            case GlobalEnums.PushPullModel.PushData:
                reportGenerator = new GeneratePushDataReport(model, reportStructure);
                break;

            case GlobalEnums.PushPullModel.FormSheet:
                reportGenerator = new GenerateFormSheetReport(model, reportStructure);
                break;
            }
            return(reportGenerator);
        }
Пример #6
0
        public static IReportGenerator Create(ReportModel model,
                                              Properties customizer)
        {
            IReportGenerator reportGenerator = null;

            switch (model.DataModel)
            {
            case GlobalEnums.PushPullModel.PullData:
                reportGenerator = new GeneratePullDataReport(model, customizer);

                break;

            case GlobalEnums.PushPullModel.PushData:
                reportGenerator = new GeneratePushDataReport(model, customizer);
                break;

            case GlobalEnums.PushPullModel.FormSheet:
                reportGenerator = new GenerateFormSheetReport(model, customizer);
                break;
            }
            return(reportGenerator);
        }