public static XtraReport GetReportbyName(string name, object dataSource, INextBOUnitOfWork unitOfWork) { var dbReport = GetReportFromDb(name, unitOfWork); XtraReport report = XtraReport.FromXmlStream(GetStreamFromXmlString(dbReport.REPORT)); report.Report.DataSource = dataSource; report.ScriptsSource = null; return(report); }
public static XtraReport GetReportbyName(string name, IEnumerable <object> dataSource, INextBOUnitOfWork unitOfWork) { var dbReport = GetReportFromDb(name, unitOfWork); XtraReport report = XtraReport.FromXmlStream(GetStreamFromXmlString(dbReport.REPORT)); var ds = new DataSource { List = dataSource }; report.Report.DataSource = ds; report.Report.DataMember = "List"; report.ScriptsSource = null; return(report); }