public void SetDataSource(IReportDataSource dataSource) { if (dataSource == null) { throw new ArgumentNullException("dataSource", "Report data source can not be null"); } if (string.IsNullOrEmpty(dataSource.SqlQuery)) { throw new ReportException("Report data source contain empty sql query"); } DataSource = dataSource; }
public ReportDataModel(IDataSet dataSet, IReportDataSource source) { this.Name = dataSet.Name; this.Source = source; this.Schema = dataSet.Query.CommandText; if (dataSet.Query.QueryParameters.Count > 0) { this.Settings = new Dictionary <string, string>(StringComparer.OrdinalIgnoreCase); foreach (var parameter in dataSet.Query.QueryParameters) { this.Settings.Add(parameter.Name, parameter.Value.Expression); } } }
public IReportDataLoader Locate(IReportDataSource source) { var dataAccess = string.IsNullOrEmpty(source.Name) || source.Name == "_" ? _serviceProvider.GetDataAccess() : _serviceProvider.GetDataAccess(source.Name); return null; //return new ReportDataLoader(dataAccess); }
public void Add(IReportDataSource reportDataSource) { ReportDataSourceCollection.Add(((ServerReportDataSource)reportDataSource).ReportDataSource); }
public ReportsController(IReportDataSource reportDataSource) { _reportDataSource = reportDataSource; }