B2022-093 Added a message on the RO Usage Report when no RO usages are found.
This commit is contained in:
parent
59a5f20310
commit
9c6a4c93dc
@ -1075,57 +1075,65 @@ namespace Volian.Print.Library
|
|||||||
string lastProcNum = string.Empty;
|
string lastProcNum = string.Empty;
|
||||||
string lastSection = string.Empty;
|
string lastSection = string.Empty;
|
||||||
string lastDVPath = string.Empty;
|
string lastDVPath = string.Empty;
|
||||||
|
if (_ResultList.Count > 0)
|
||||||
foreach (ItemInfo item in _ResultList)
|
|
||||||
{
|
{
|
||||||
bool differentProcSet = false;
|
foreach (ItemInfo item in _ResultList)
|
||||||
bool differentRO = false;
|
|
||||||
// Check Doc Version path
|
|
||||||
// if more than one procedure set is in the report data, then
|
|
||||||
// we will output the procedure set title inside the grouping of each RO
|
|
||||||
// otherwise, if we are reporting on only one procedure set, print the
|
|
||||||
// procedure set title at the top of the report (once).
|
|
||||||
if (lastDVPath != "" && lastDVPath != item.SearchDVPath)
|
|
||||||
{
|
{
|
||||||
subTable = new PdfPTable(headerwidths);
|
bool differentProcSet = false;
|
||||||
AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0);
|
bool differentRO = false;
|
||||||
lastProcNum = string.Empty;
|
// Check Doc Version path
|
||||||
lastSection = string.Empty;
|
// if more than one procedure set is in the report data, then
|
||||||
}
|
// we will output the procedure set title inside the grouping of each RO
|
||||||
|
// otherwise, if we are reporting on only one procedure set, print the
|
||||||
lastDVPath = item.SearchDVPath;
|
// procedure set title at the top of the report (once).
|
||||||
//check for different procedure number
|
if (lastDVPath != "" && lastDVPath != item.SearchDVPath)
|
||||||
string curProcNum = GetCurProcNum(item.SearchPath);
|
|
||||||
string curSection = GetCurSectionNumTitle(item);
|
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(lastProcNum) && (curProcNum != lastProcNum))
|
|
||||||
{
|
|
||||||
if (roUse.Count > 0)
|
|
||||||
{
|
{
|
||||||
PutROusageForProcedure(datatable, roUse, headerwidths);
|
subTable = new PdfPTable(headerwidths);
|
||||||
roUse.Clear();
|
AddMainPathGroup(datatable, item.SearchDVPath, splitAt, f2, Color.LIGHT_GRAY, 0);
|
||||||
|
lastProcNum = string.Empty;
|
||||||
|
lastSection = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastSection = string.Empty;
|
lastDVPath = item.SearchDVPath;
|
||||||
}
|
//check for different procedure number
|
||||||
|
string curProcNum = GetCurProcNum(item.SearchPath);
|
||||||
|
string curSection = GetCurSectionNumTitle(item);
|
||||||
|
|
||||||
if (!string.IsNullOrEmpty(lastSection) && (curSection != lastSection))
|
if (!string.IsNullOrEmpty(lastProcNum) && (curProcNum != lastProcNum))
|
||||||
{
|
|
||||||
if (roUse.Count > 0)
|
|
||||||
{
|
{
|
||||||
PutROusageForProcedure(datatable, roUse, headerwidths);
|
if (roUse.Count > 0)
|
||||||
roUse.Clear();
|
{
|
||||||
|
PutROusageForProcedure(datatable, roUse, headerwidths);
|
||||||
|
roUse.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
lastSection = string.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(lastSection) && (curSection != lastSection))
|
||||||
|
{
|
||||||
|
if (roUse.Count > 0)
|
||||||
|
{
|
||||||
|
PutROusageForProcedure(datatable, roUse, headerwidths);
|
||||||
|
roUse.Clear();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AddROUsages(item, roUse); // add the used ro to the list for this procedure
|
||||||
|
AddProcedureSectionGroup(datatable, curProcNum, lastProcNum, curSection, lastSection, f2, new Color(0xC0, 0xFF, 0xC0));
|
||||||
|
|
||||||
|
lastProcNum = curProcNum;
|
||||||
|
lastSection = curSection;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddROUsages(item, roUse); // add the used ro to the list for this procedure
|
|
||||||
AddProcedureSectionGroup(datatable, curProcNum, lastProcNum, curSection, lastSection, f2, new Color(0xC0, 0xFF, 0xC0));
|
|
||||||
|
|
||||||
lastProcNum = curProcNum;
|
|
||||||
lastSection = curSection;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
PutROusageForProcedure(datatable, roUse, headerwidths);
|
{ // B2022-093 put out a message if no RO Usages were found
|
||||||
|
cell = new PdfPCell(new Phrase("No RO Usage Information Found", f3));
|
||||||
|
cell.HorizontalAlignment = Element.ALIGN_LEFT;
|
||||||
|
//cell.BackgroundColor = new Color(0xD0, 0xF0, 0xF0); // light blue
|
||||||
|
datatable.AddCell(cell);
|
||||||
|
}
|
||||||
|
PutROusageForProcedure(datatable, roUse, headerwidths);
|
||||||
|
|
||||||
document.Add(datatable);
|
document.Add(datatable);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user