Fix report to support multiple procedure sets
This commit is contained in:
parent
bcc0cfca48
commit
b223a1937e
@ -260,9 +260,9 @@ namespace Volian.Print.Library
|
|||||||
}
|
}
|
||||||
lastPath = p;
|
lastPath = p;
|
||||||
if (ProcSetList.Count == 1)
|
if (ProcSetList.Count == 1)
|
||||||
level = NewPath.Length + 1;
|
level = NewPath.Length-1;
|
||||||
}
|
}
|
||||||
if (level > 0) level--;
|
//if (level > 0) level--;
|
||||||
return level;
|
return level;
|
||||||
}
|
}
|
||||||
public void AddMainPathGroup(PdfPTable datatable, string dvPath, int splitLevel, Font f2, Color bgColor, int colSpan)
|
public void AddMainPathGroup(PdfPTable datatable, string dvPath, int splitLevel, Font f2, Color bgColor, int colSpan)
|
||||||
@ -416,7 +416,6 @@ namespace Volian.Print.Library
|
|||||||
float[] headerwidths = { 20, 80 };
|
float[] headerwidths = { 20, 80 };
|
||||||
PdfPTable datatable = new PdfPTable(1);
|
PdfPTable datatable = new PdfPTable(1);
|
||||||
PdfPTable colHeader = new PdfPTable(headerwidths);
|
PdfPTable colHeader = new PdfPTable(headerwidths);
|
||||||
datatable.HeaderRows = 4;
|
|
||||||
//datatable.FooterRows = 1;
|
//datatable.FooterRows = 1;
|
||||||
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
datatable.TotalWidth = document.PageSize.Width - document.LeftMargin - document.RightMargin;
|
||||||
datatable.LockedWidth = true;
|
datatable.LockedWidth = true;
|
||||||
@ -440,8 +439,9 @@ namespace Volian.Print.Library
|
|||||||
datatable.AddCell(cell);
|
datatable.AddCell(cell);
|
||||||
|
|
||||||
BuildSearchResultsProcSetList();
|
BuildSearchResultsProcSetList();
|
||||||
|
datatable.HeaderRows = 3 + (ProcSetList.Count ==1 ? 1 : 0);
|
||||||
int splitAt = FindSpitLevel(); // find the split level of the common path - for all procedure sets that use these library documents
|
int splitAt = FindSpitLevel(); // find the split level of the common path - for all procedure sets that use these library documents
|
||||||
AddMainPathGroup(datatable, ProcSetList[0].ToString(), splitAt, f2, Color.LIGHT_GRAY, 0);
|
//AddMainPathGroup(datatable, ProcSetList[0].ToString(), splitAt, f2, Color.LIGHT_GRAY, 0);
|
||||||
|
|
||||||
Color subHeaderColor = new Color(0xD0, 0xF0, 0xD0);
|
Color subHeaderColor = new Color(0xD0, 0xF0, 0xD0);
|
||||||
datatable.DefaultCell.Padding = 4;
|
datatable.DefaultCell.Padding = 4;
|
||||||
@ -450,7 +450,7 @@ namespace Volian.Print.Library
|
|||||||
//AddCell(datatable, "Text", f2, subHeaderColor);
|
//AddCell(datatable, "Text", f2, subHeaderColor);
|
||||||
AddCell(colHeader, "Step", f2, subHeaderColor);
|
AddCell(colHeader, "Step", f2, subHeaderColor);
|
||||||
AddCell(colHeader, "Text", f2, subHeaderColor);
|
AddCell(colHeader, "Text", f2, subHeaderColor);
|
||||||
datatable.AddCell(colHeader);
|
//datatable.AddCell(colHeader);
|
||||||
// This puts "Step" and "Text" column headers at the bottom of the page
|
// This puts "Step" and "Text" column headers at the bottom of the page
|
||||||
//AddCell(datatable, "Step", f2, subHeaderColor);
|
//AddCell(datatable, "Step", f2, subHeaderColor);
|
||||||
//AddCell(datatable, "Text", f2, subHeaderColor);
|
//AddCell(datatable, "Text", f2, subHeaderColor);
|
||||||
@ -462,8 +462,18 @@ namespace Volian.Print.Library
|
|||||||
Color SectColor = new Color(0xE0, 0xFF, 0xE0);//new Color(0xC0, 0xFF, 0xC0);//Color.LIGHT_GRAY;
|
Color SectColor = new Color(0xE0, 0xFF, 0xE0);//new Color(0xC0, 0xFF, 0xC0);//Color.LIGHT_GRAY;
|
||||||
PdfPTable subTable = new PdfPTable(headerwidths);
|
PdfPTable subTable = new PdfPTable(headerwidths);
|
||||||
string lastProcNum = "";
|
string lastProcNum = "";
|
||||||
|
string lastDVPath = "";
|
||||||
foreach (ItemInfo item in _ResultList)
|
foreach (ItemInfo item in _ResultList)
|
||||||
{
|
{
|
||||||
|
if (lastDVPath != item.SearchDVPath)
|
||||||
|
{
|
||||||
|
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);
|
string curProcNum = GetCurProcNum(item.SearchPath);
|
||||||
if (lastProcNum != "" && curProcNum != lastProcNum)
|
if (lastProcNum != "" && curProcNum != lastProcNum)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user