Ejemplo n.º 1
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;
		}
Ejemplo n.º 2
0
		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;
		}