public void GetValue(Guid id, string reportType, Template templateDetails, IReportsData reportDetails) { var citationReportDetails = _citationReportQueryService.FindCitationReport(id); if (templateDetails != null) //Added check for null before being dereferenced { _reportHeaderBuilder.GenerateReportHeader(ModuleType.Citation.GetDescription(), reportType, citationReportDetails.CaseNumber, citationReportDetails.Number, citationReportDetails.Agency.AgencyId, reportDetails, templateDetails.CaseNumberReportDisplayType, templateDetails.ReportNumberReportDisplayType); if (templateDetails.Sections.Any()) { foreach (var section in templateDetails.Sections) { PrepareCitationReportSectionsForReport(section, section.Name, citationReportDetails, reportDetails); } } } _attachmentBuilder.ReadAttachments(citationReportDetails.Attachments, reportDetails); }
public CitationReport Get(Guid id) { return(_citationReportQueryService.FindCitationReport(id)); }