Example #1
0
        private ReportResult RunReport(excel.Worksheet xlsWorksheet, Dictionary<string, Indicator> indicators, ReportOptions options, IReportGenerator gen, int typeId)
        {
            foreach (var indicator in indicators.Where(i => !i.Value.IsMetaData && !i.Value.IsCalculated))
                options.SelectedIndicators.Add(ReportRepository.CreateReportIndicator(typeId, indicator));

            ReportResult result = gen.Run(new SavedReport { ReportOptions = options });
            result.DataTableResults.Columns.Remove(TranslationLookup.GetValue("Location"));
            result.DataTableResults.Columns.Remove(TranslationLookup.GetValue("Type"));
            result.DataTableResults.Columns.Remove(TranslationLookup.GetValue("Year"));
            return result;
        }