public IEnumerable<Dictionary<string, object>> Execute(ReportModel report, IEnumerable<Argument> args) { var reportResult = ExecuteRaw(report, args); var projectedResult = Project(reportResult, _outputParser.Parse(report.Output)); return projectedResult; }
public IEnumerable<Dictionary<string, object>> ExecuteRaw(ReportModel report, IEnumerable<Argument> args) { var query = report.Query; var result = ExecuteRaw(query, args.ToArray()); return result; }
private void AddReportToResponse(List<ReportConfigViewModel> result, ReportModel report, IEnumerable<Parameter> parameters) { result.Add(new ReportConfigViewModel { Id = report.Id, Name = report.Name, Output = report.Output, ParamsDefaultConfiguration = report.ParamsDefaultConfiguration, Parameters = parameters.ToArray(), UserFilters = report.UserFilters, //report.UserFilters.Where(f => f.ReportId == report.Id).Select(x => GetUserFilterViewModel(x.Filter)).ToArray(), PredefinedFilters = report.PredefinedFilters.Where(f => f.ReportId == report.Id).Select(x => GetPredefinedFilterViewModel(x.Filter)).ToArray(), SubReport = report.SubReports .Where(r => r.FromId == report.Id).Select(x => new SubReportConfigModel { SubReportId = x.ToId, DependencyProperty = x.DependencyProperty, IndexParamName = x.IndexParamName }), IndexColumnName = report.IndexColumnName, ReportName = report.Name, ParentReportIds = report.ParentReports.Where(r => r.ToId == report.Id).Select(x => x.FromId), IsStandAlone = report.IsStandAlone, Labels = report.Labels.Select(label => new LabelViewModel { ColumnName = label.ColumnName, Label = label.Label }), Category = report.Category }); }