Allow the userr to speciffy if they want annotations to be listed for non-annotation searches

This commit is contained in:
Rich 2016-02-03 15:14:08 +00:00
parent 970ba90c35
commit 0eeac0cb7f
2 changed files with 9 additions and 1 deletions

View File

@ -937,6 +937,14 @@ namespace VEPROMS
Volian.Base.Library.VlnSettings.TemporaryFolder + @"\searchresults.pdf");
if (args.SearchString != null)
myReport.SearchString = args.SearchString;
if (!args.ReportTitle.Contains("Annotation"))
{
int annotationCount = 0;
foreach (ItemInfo itm in args.MyItemInfoList)
annotationCount += itm.ItemAnnotationCount;
if (annotationCount > 0)
myReport.ShowAnnotations = (MessageBox.Show("Show Annotations", "Include Annotations", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes);
}
myReport.Build();
}

View File

@ -547,7 +547,7 @@ namespace Volian.Print.Library
//else
//AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
AddCell(subTable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
if (item.ItemAnnotationCount > 0)
if (ShowAnnotations && item.ItemAnnotationCount > 0)
{
foreach (AnnotationInfo ai in item.ItemAnnotations)
{