public AbstractLayout(ReportModel reportModel) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } this.ReportModel = reportModel; }
/// <summary> /// Default constructor - initializes all fields to default values /// </summary> public GeneratePushDataReport(ReportModel reportModel, Properties properties):base(reportModel,properties) { base.UpdateGenerator(); base.UpdateModel(); }
public ListLayout(ReportModel reportModel,ReportItemCollection reportItemCollection):base(reportModel) { this.reportItems = reportItemCollection; ICSharpCode.Reports.Core.BaseRowItem row = new ICSharpCode.Reports.Core.BaseRowItem(); AdjustContainer(base.ReportModel.DetailSection,row); base.ParentItem = row; }
public CollectParametersCommand (ReportModel model) { if (model == null) { throw new ArgumentNullException("model"); } this.model = model; }
public static ReportModel Create() { ReportModel m = new ReportModel(); foreach (GlobalEnums.ReportSection sec in Enum.GetValues(typeof(GlobalEnums.ReportSection))) { m.SectionCollection.Add (SectionFactory.Create(sec.ToString())); } return m; }
public GeneratePullDataReport(ReportModel reportModel,ReportStructure reportStructure):base(reportModel,reportStructure) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } base.UpdateGenerator(); base.UpdateModel(); base.SqlQueryParameters.AddRange(base.ReportStructure.SqlQueryParameters); }
public void AddContent (ReportModel reportModel) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } this.reportModel = reportModel; this.explorerTree.ReportModel = this.reportModel; ViewCount++; }
public GeneratePlainReport(ReportModel reportModel,Properties customizer):base(reportModel,customizer) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (base.ReportModel.ReportSettings.DataModel != GlobalEnums.PushPullModel.FormSheet) { throw new InvalidReportModelException(); } }
public GenerateFormSheetReport(ReportModel reportModel,ReportStructure reportStructure ):base(reportModel,reportStructure) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (base.ReportModel.ReportSettings.DataModel != GlobalEnums.PushPullModel.FormSheet) { throw new InvalidReportModelException(); } }
private AbstractRenderer PushDataRenderer(ReportModel model) { ICSharpCode.Reports.Addin.Commands.DataSetFromXsdCommand cmd = new ICSharpCode.Reports.Addin.Commands.DataSetFromXsdCommand(); cmd.Run(); DataSet ds = cmd.DataSet; if ( ds != null) { return base.SetupPushDataRenderer(model,ds.Tables[0]); } return null; }
public AbstractPreviewCommand(ReportModel model, ICSharpCode.Reports.Core.ReportViewer.PreviewControl reportViewer) { if (model == null) { throw new ArgumentNullException ("model"); } if (reportViewer == null) { throw new ArgumentNullException("reportViewer"); } this.model = model; this.reportViewer = reportViewer; }
protected AbstractReportGenerator(ReportModel reportModel,Properties customizer) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (customizer == null) { throw new ArgumentNullException("customizer"); } this.properties = customizer; this.reportModel = reportModel; }
public ReportModel CreateRenderableModel() { ReportModel m = new ReportModel(); generator.MergeFormChanges((System.CodeDom.CodeCompileUnit)null); XmlDocument doc = new XmlDocument(); doc.LoadXml(generator.ViewContent.ReportFileContent); ReportLoader rl = new ReportLoader(); object root = rl.Load(doc.DocumentElement); m = root as ReportModel; m.ReportSettings.FileName = generator.ViewContent.PrimaryFileName; FilePathConverter.AdjustReportName(m); return m; }
public static void AdjustReportName (ReportModel model) { if (model == null) { throw new ArgumentNullException("model"); } foreach (BaseSection section in model.SectionCollection) { foreach (BaseReportItem item in section.Items) { BaseImageItem baseImageItem = item as BaseImageItem; if (baseImageItem != null) { baseImageItem.ReportFileName = model.ReportSettings.FileName; } } } }
public static AbstractLayout CreateGenerator (GlobalEnums.ReportLayout reportLayout, ReportModel model, ReportItemCollection items) { AbstractLayout layout = null; switch (reportLayout) { case GlobalEnums.ReportLayout.ListLayout: layout = new ListLayout(model,items); break; case GlobalEnums.ReportLayout.TableLayout: layout = new TableLayout(model,items); break; } return layout; }
protected AbstractReportGenerator(ReportModel reportModel,ReportStructure reportStructure) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (reportStructure == null) { throw new ArgumentNullException("reportStructure"); } this.ReportModel = reportModel; ReportStructure = reportStructure; this.AvailableFieldsCollection.Clear(); this.ReportItemCollection.Clear(); this.GroupColumnCollection.Clear(); this.ParameterCollection.Clear(); }
public static void AdjustReportName (ReportModel model) { if (model == null) { throw new ArgumentNullException("model"); } System.Diagnostics.Trace.WriteLine(""); System.Diagnostics.Trace.WriteLine (String.Format("FilePathConverter:AdjustReportName {0}",model.ReportSettings.FileName)); foreach (BaseSection section in model.SectionCollection) { foreach (BaseReportItem item in section.Items) { BaseImageItem baseImageItem = item as BaseImageItem; if (baseImageItem != null) { baseImageItem.ReportFileName = model.ReportSettings.FileName; } } } }
/// <summary> /// Default constructor - initializes all fields to default values /// </summary> public GeneratePushDataReport(ReportModel reportModel, Properties properties):base(reportModel,properties) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (base.ReportModel.ReportSettings.DataModel != GlobalEnums.PushPullModel.PushData) { throw new ArgumentException ("Wrong DataModel in GeneratePushReport"); } reportStructure = (ReportStructure)properties.Get("Generator"); base.AvailableFieldsCollection.AddRange(reportStructure.AvailableFieldsCollection); base.ReportItemCollection.AddRange(reportStructure.ReportItemCollection); }
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; }
protected AbstractReportGenerator(ReportModel reportModel,Properties properties) { if (reportModel == null) { throw new ArgumentNullException("reportModel"); } if (properties == null) { throw new ArgumentNullException("customizer"); } this.ReportModel = reportModel; this.Properties = properties; ReportStructure = (ReportStructure)properties.Get("Generator"); this.AvailableFieldsCollection.Clear(); this.ReportItemCollection.Clear(); this.GroupColumnCollection.Clear(); this.ParameterCollection.Clear(); }
public override void Run() { reportStructure = new ReportStructure(); if (GlobalValues.IsValidPrinter() == true) { using (WizardDialog wizard = new WizardDialog("Report Wizard", reportStructure, WizardPath)) { if (wizard.ShowDialog() == DialogResult.OK) { reportModel = reportStructure.CreateAndFillReportModel (); CreateReportFromModel(reportModel,reportStructure); } else{ this.canceled = true; } } } else { MessageService.ShowError(ResourceService.GetString("Sharpreport.Error.NoPrinter")); } }
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; }
public AbstractRenderer CreateRenderer (ReportModel model) { if (model == null) { throw new ArgumentNullException("model"); } AbstractRenderer abstractRenderer = null; switch (model.DataModel) { case GlobalEnums.PushPullModel.FormSheet : { abstractRenderer = StandartReportRenderer(model); break; } case GlobalEnums.PushPullModel.PullData:{ abstractRenderer = StandartReportRenderer(model); break; } case GlobalEnums.PushPullModel.PushData:{ abstractRenderer = PushDataRenderer(model); break; } } return abstractRenderer; }
public static void Absolut2RelativePath (ReportModel model) { if (model == null) { throw new ArgumentNullException("model"); } foreach (BaseSection section in model.SectionCollection) { foreach (BaseReportItem item in section.Items) { BaseImageItem baseImageItem = item as BaseImageItem; if (baseImageItem != null) { baseImageItem.ReportFileName = model.ReportSettings.FileName; if (Path.IsPathRooted(baseImageItem.ImageFileName)) { string d = FileUtility.GetRelativePath( Path.GetDirectoryName(model.ReportSettings.FileName), Path.GetDirectoryName(baseImageItem.ImageFileName)); baseImageItem.RelativeFileName = d + Path.DirectorySeparatorChar + Path.GetFileName(baseImageItem.ImageFileName); } } } } }
void ShowData() { this.model = reportStructure.CreateAndFillReportModel(); this.resultDataSet = FillGrid(); if (resultDataSet.Tables.Count > 0) { SetupGrid (); } }
public void Init() { this.reportModel = CreateModel(reportName); }
public XmlDocument CreateXmlModel() { Console.WriteLine("ReportDesignerLoader:CreateXmlModel"); ReportModel m = new ReportModel(); generator.MergeFormChanges((System.CodeDom.CodeCompileUnit)null); XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(generator.ViewContent.ReportFileContent); return xmlDocument; }
protected override void PerformLoad(IDesignerSerializationManager serializationManager) { InternalReportLoader internalLoader = new InternalReportLoader(this.host,generator, stream); internalLoader.LoadOrCreateReport(); this.reportModel = internalLoader.ReportModel; }
private AbstractRenderer StandartReportRenderer(ReportModel model) { ICSharpCode.Reports.Addin.Commands.CollectParametersCommand cmd = new ICSharpCode.Reports.Addin.Commands.CollectParametersCommand(model.ReportSettings); cmd.Run(); return base.SetupStandardRenderer (model,null); }
private void CreateReportFromModel (ReportModel model) { reportGenerator = GeneratorFactory.Create (model,customizer); file.MakeDirty(); reportGenerator.GenerateReport(); }