bool IWizardCustomizationService.TryCreateReport(XtraReportModel model, out XtraReport report) { var customModel = model as CustomReportModel; if (customModel == null || model.ReportType == ReportType.Template || model.ReportType == ReportType.Label) { report = null; return(false); } IDataComponent dataSource = null; string dataMember = null; if (customModel.ReportType != ReportType.Empty) { var dataComponentCreator = new DataComponentCreator(); dataSource = dataComponentCreator.CreateDataComponent(model); dataMember = dataSource.DataMember; } var builder = new DevExpress.Xpf.Reports.UserDesigner.ReportWizard.ReportBuilder(dataSource, dataMember); report = new XtraReport(); report.PaperKind = customModel.PaperKind; report.Margins = customModel.PageMargins; builder.Build(report, customModel); return(true); }
private ReportModel GetDefaultLabelReportMode(CustomLabelReportModel model) { XtraReportModel reportModel = new XtraReportModel(); reportModel.ReportType = ReportType.Label; var customLblInfo = new CustomLabelInformation(); customLblInfo.Height = model.LabelHeight; customLblInfo.Width = model.LabelWidth; customLblInfo.TopMargin = model.TopMargin; customLblInfo.BottomMargin = model.BottomMargin; customLblInfo.LeftMargin = model.LeftMargin; customLblInfo.RightMargin = model.RightMargin; customLblInfo.VerticalPitch = model.VerticalPitch; customLblInfo.HorizontalPitch = model.HorizontalPitch; customLblInfo.PaperKindDataId = model.PaperKindID; customLblInfo.Unit = model.MeasurementUnit; reportModel.CustomLabelInformation = customLblInfo; return(reportModel); }
public bool TryCreateReport(IDesignerHost designerHost, XtraReportModel model, object dataSource, string dataMember) { return(false); }
bool IWizardCustomizationService.TryCreateReport(XtraReportModel model, out XtraReport report) { report = null; return(false); }
bool IWizardCustomizationService.TryCreateReport(IDesignerHost designerHost, XtraReportModel model, object dataSource, string dataMember) { return(false); }