public IList <object[]> BuildReport(ReportType type, ReportFilter filter) { filter = (ReportFilter)filter.Clone(); switch (type) { case ReportType.MilestonesExpired: case ReportType.MilestonesNearest: return(BuildMilestonesReport(filter)); case ReportType.UsersWithoutActiveTasks: return(BuildUsersWithoutActiveTasks(filter)); case ReportType.ProjectsWithoutActiveMilestones: return(BuildProjectsWithoutActiveMilestones(filter)); case ReportType.ProjectsWithoutActiveTasks: return(BuildProjectsWithoutActiveTasks(filter)); case ReportType.UsersActivity: throw new NotImplementedException(); case ReportType.UsersWorkload: return(BuildUsersWorkload(filter)); case ReportType.ProjectsList: return(BuildProjectsListReport(filter)); case ReportType.TasksByUsers: case ReportType.TasksByProjects: case ReportType.TasksExpired: return(BuildTasksListReport(filter)); case ReportType.TimeSpend: return(BuildTimeSpendReport(filter)); default: throw new ArgumentOutOfRangeException("reportType"); } }
/// <summary> /// Generates a nested report filter for a query row /// </summary> /// <param name="parentFilter">The parent report filter</param> /// <param name="row">The query row</param> /// <returns>The report filter generated</returns> public ReportFilter GenerateNestedFilter ( ReportFilter parentFilter, QueryRow row ) { Validate.IsNotNull(parentFilter); Validate.IsNotNull(row); var parameterOverrides = CompileParameterValues ( parentFilter, row ); var nestedFilter = parentFilter.Clone(); nestedFilter.SetParameterValues ( parameterOverrides ); return(nestedFilter); }
public IList <object[]> BuildProjectsListReport(ReportFilter filter) { filter = (ReportFilter)filter.Clone(); return(SelectOnlyCanReadProjects(reportDao.BuildProjectListReport(filter))); }