Fixed logic to Copy Search Results to eliminate duplicate steps in the results
Fixed logic to Print Search Results to eliminate duplicate steps in the results Fixed logic to prooperly output the procedure number and title
This commit is contained in:
@@ -404,6 +404,7 @@ namespace Volian.Print.Library
|
||||
{
|
||||
if (document.IsOpen())
|
||||
{
|
||||
document.Add(new Phrase("End of Search Results",FontFactory.GetFont("Arial",4)));
|
||||
document.Close();
|
||||
System.Diagnostics.Process.Start(_FileName);
|
||||
}
|
||||
@@ -520,40 +521,45 @@ namespace Volian.Print.Library
|
||||
PdfPTable subTable = new PdfPTable(headerwidths);
|
||||
string lastProcNum = "";
|
||||
string lastDVPath = "";
|
||||
List<int> processedItems = new List<int>();
|
||||
foreach (ItemInfo item in _ResultList)
|
||||
{
|
||||
if (lastDVPath != item.SearchDVPath)
|
||||
if (!processedItems.Contains(item.ItemID))
|
||||
{
|
||||
datatable.AddCell(subTable);
|
||||
subTable = new PdfPTable(headerwidths);
|
||||
AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0);
|
||||
datatable.AddCell(colHeader);
|
||||
lastProcNum = "";
|
||||
}
|
||||
lastDVPath = item.SearchDVPath;
|
||||
string curProcNum = GetCurProcNum(item.SearchPath);
|
||||
if (lastProcNum != "" && curProcNum != lastProcNum)
|
||||
{
|
||||
datatable.AddCell(subTable);
|
||||
subTable = new PdfPTable(headerwidths);
|
||||
}
|
||||
lastProcNum = curProcNum;
|
||||
string stepPath = AddGroup(subTable, item.SearchPath ?? item.ShortPath, lastPath, f2, true, new Color(0xC0, 0xFF, 0xC0), true);
|
||||
lastPath = item.SearchPath ?? item.ShortPath;
|
||||
stepPath = BuildStepTab(item);
|
||||
AddCell(subTable, stepPath, f2, (item.IsSection ? SectColor : TextColor));
|
||||
// This was for the old 16-bit style of table - jsj 7/7/2011
|
||||
//if (item.DisplayText.Contains("|")) // Need a better way to determine if it is a table.
|
||||
// AddCell(datatable, item.DisplayText, f3, TextColor);
|
||||
//else
|
||||
//AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
|
||||
AddCell(subTable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
|
||||
if (ShowAnnotations && item.ItemAnnotationCount > 0)
|
||||
{
|
||||
foreach (AnnotationInfo ai in item.ItemAnnotations)
|
||||
processedItems.Add(item.ItemID);
|
||||
if (lastDVPath != item.SearchDVPath)
|
||||
{
|
||||
AddCell(subTable, ai.MyAnnotationType.Name, f2, AnnoColor);
|
||||
AddCell(subTable, ai.SearchText, f2, AnnoColor);
|
||||
datatable.AddCell(subTable);
|
||||
subTable = new PdfPTable(headerwidths);
|
||||
AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0);
|
||||
datatable.AddCell(colHeader);
|
||||
lastProcNum = "";
|
||||
}
|
||||
lastDVPath = item.SearchDVPath;
|
||||
string curProcNum = GetCurProcNum(item.SearchPath);
|
||||
//if (lastProcNum != "" && curProcNum != lastProcNum)
|
||||
//{
|
||||
datatable.AddCell(subTable);
|
||||
subTable = new PdfPTable(headerwidths);
|
||||
//}
|
||||
lastProcNum = curProcNum;
|
||||
string stepPath = AddGroup(subTable, item.SearchPath ?? item.ShortPath, lastPath, f2, true, new Color(0xC0, 0xFF, 0xC0), true);
|
||||
lastPath = item.SearchPath ?? item.ShortPath;
|
||||
stepPath = BuildStepTab(item);
|
||||
AddCell(subTable, stepPath, f2, (item.IsSection ? SectColor : TextColor));
|
||||
// This was for the old 16-bit style of table - jsj 7/7/2011
|
||||
//if (item.DisplayText.Contains("|")) // Need a better way to determine if it is a table.
|
||||
// AddCell(datatable, item.DisplayText, f3, TextColor);
|
||||
//else
|
||||
//AddCell(datatable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
|
||||
AddCell(subTable, item.DisplayText, f2, (item.IsSection ? SectColor : TextColor));
|
||||
if (ShowAnnotations && item.ItemAnnotationCount > 0)
|
||||
{
|
||||
foreach (AnnotationInfo ai in item.ItemAnnotations)
|
||||
{
|
||||
AddCell(subTable, ai.MyAnnotationType.Name, f2, AnnoColor);
|
||||
AddCell(subTable, ai.SearchText, f2, AnnoColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user