public DataMatrix ChecklistReport(int taxonID, string criteriaDisplayText, ChecklistReportExtent extent, bool availableNames, bool literatureNames, ChecklistReportRankDepth?depth, bool userDefinedOrder, bool verifiedOnly, List <TaxonRankName> selectedRanks) { var b = new RTFReportBuilder(); var data = GetChecklistData(taxonID, 0, extent == ChecklistReportExtent.FullHierarchy, userDefinedOrder, verifiedOnly, selectedRanks); // Process the list, generating the RTF... // Create the Header inforrmation b.AppendFullHeader(); // Create the title information b.Append(@"\pard\fs36\b Taxon Checklist Report\b0\pard\par\fs22 ").Append(criteriaDisplayText).Append(@"\pard\par\fs16 Generated: "); b.AppendCurrentDate().Par().Par(); int i = 0; foreach (ChecklistData item in data) { ++i; if (!availableNames && item.AvailableName || !literatureNames && item.LiteratureName) { // ignore this one } else { b.Append(@"\par\pard\fs20\li{0} {1}", item.IndentLevel * 300, FormatChecklistRow(item, i, depth)); } } b.Append("}"); return(b.GetAsMatrix()); }
public DataMatrix ChecklistReport(int taxonID, string criteriaDisplayText, ChecklistReportExtent extent, bool availableNames, bool literatureNames, ChecklistReportRankDepth? depth, bool userDefinedOrder, bool verifiedOnly, List<TaxonRankName> selectedRanks) { var b = new RTFReportBuilder(); var data = GetChecklistData(taxonID, 0, extent == ChecklistReportExtent.FullHierarchy, userDefinedOrder, verifiedOnly, selectedRanks); // Process the list, generating the RTF... // Create the Header inforrmation b.AppendFullHeader(); // Create the title information b.Append(@"\pard\fs36\b Taxon Checklist Report\b0\pard\par\fs22 ").Append(criteriaDisplayText).Append(@"\pard\par\fs16 Generated: "); b.AppendCurrentDate().Par().Par(); int i = 0; foreach (ChecklistData item in data) { ++i; if (!availableNames && item.AvailableName || !literatureNames && item.LiteratureName) { // ignore this one } else { b.Append(@"\par\pard\fs20\li{0} {1}", item.IndentLevel * 300, FormatChecklistRow(item, i, depth)); } } b.Append("}"); return b.GetAsMatrix(); }