B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
This commit is contained in:
@@ -1074,7 +1074,9 @@ namespace Volian.Print.Library
|
||||
|
||||
string lastProcNum = string.Empty;
|
||||
string lastSection = string.Empty;
|
||||
string lastDVPath = string.Empty;
|
||||
//CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
|
||||
//setting this to something other than empty - otherwise will not print first initial header
|
||||
string lastDVPath = "start";
|
||||
if (_ResultList.Count > 0)
|
||||
{
|
||||
foreach (ItemInfo item in _ResultList)
|
||||
@@ -1088,6 +1090,12 @@ namespace Volian.Print.Library
|
||||
// procedure set title at the top of the report (once).
|
||||
if (lastDVPath != "" && lastDVPath != item.SearchDVPath)
|
||||
{
|
||||
//CSM B2021-043 Step numbering is out of order in RO usage report if RO values exist on steps 10 or higher.
|
||||
//was placing last item from the precious section in the new section
|
||||
//place it before starting the new section and then clear items
|
||||
PutROusageForProcedure(datatable, roUse, headerwidths);
|
||||
roUse.Clear();
|
||||
|
||||
subTable = new PdfPTable(headerwidths);
|
||||
AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0);
|
||||
lastProcNum = string.Empty;
|
||||
@@ -1138,7 +1146,7 @@ namespace Volian.Print.Library
|
||||
document.Add(datatable);
|
||||
}
|
||||
|
||||
private void AddProcROUse(ItemInfo item, SortedDictionary<string, List<ItemInfo>> procRoUse)
|
||||
private void AddProcROUse(ItemInfo item, Dictionary<string, List<ItemInfo>> procRoUse)
|
||||
{
|
||||
string dictKey = GetCurProcNum(item.SearchPath) + " " + GetCurSectionNumTitle(item);
|
||||
|
||||
@@ -1157,7 +1165,7 @@ namespace Volian.Print.Library
|
||||
}
|
||||
}
|
||||
|
||||
private void PutStepListForProcedure(PdfPTable rotable, SortedDictionary<string, ItemInfo> sortedStepList)
|
||||
private void PutStepListForProcedure(PdfPTable rotable, Dictionary<string, ItemInfo> sortedStepList)
|
||||
{
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
@@ -1173,13 +1181,13 @@ namespace Volian.Print.Library
|
||||
sortedStepList.Clear();
|
||||
}
|
||||
|
||||
private void PutROusageForROID(PdfPTable curTable, SortedDictionary<string, List<ItemInfo>> procRoUse, float[] headerwidths, int splitAt, bool moreThanOneProcSet)
|
||||
private void PutROusageForROID(PdfPTable curTable, Dictionary<string, List<ItemInfo>> procRoUse, float[] headerwidths, int splitAt, bool moreThanOneProcSet)
|
||||
{
|
||||
// C2017-036 get best available proportional font for symbols that looks close to Arial
|
||||
// Note that Microsoft no longer supplies Arial Unicode MS as of Word16
|
||||
iTextSharp.text.Font f2 = pdf.GetFont(Volian.Base.Library.vlnFont.ReportsFont, 10, 0, Color.BLACK);
|
||||
|
||||
SortedDictionary<string, ItemInfo> sortedStepList = new SortedDictionary<string, ItemInfo>();
|
||||
Dictionary<string, ItemInfo> sortedStepList = new Dictionary<string, ItemInfo>();
|
||||
string lastProcKey = string.Empty;
|
||||
string lastProcNumTitle = string.Empty;
|
||||
string lastDVPath = string.Empty;
|
||||
@@ -1293,7 +1301,7 @@ namespace Volian.Print.Library
|
||||
|
||||
private void BuildROUsageTableByRO(iTextSharp.text.Document document)
|
||||
{
|
||||
SortedDictionary<string, List<ItemInfo>> procRoUse = new SortedDictionary<string, List<ItemInfo>>();
|
||||
Dictionary<string, List<ItemInfo>> procRoUse = new Dictionary<string, List<ItemInfo>>();
|
||||
|
||||
float[] headerwidths = { 20, 80 };
|
||||
PdfPTable datatable = new PdfPTable(1);
|
||||
|
Reference in New Issue
Block a user