B2022-111: Approval/Summary of changes has “Error Argument out of Range Exception
This commit is contained in:
parent
7f683c98ce
commit
6e3d3043d7
@ -1502,6 +1502,7 @@ namespace Volian.Print.Library
|
|||||||
if (cai.Type == 20008)
|
if (cai.Type == 20008)
|
||||||
{
|
{
|
||||||
GridAuditInfoList gail = GridAuditInfoList.Get(cai.ContentID);
|
GridAuditInfoList gail = GridAuditInfoList.Get(cai.ContentID);
|
||||||
|
bool addedInfo = false;
|
||||||
if (gail.Count > 0)
|
if (gail.Count > 0)
|
||||||
{
|
{
|
||||||
GridAuditInfo gai = gail[0];
|
GridAuditInfo gai = gail[0];
|
||||||
@ -1513,6 +1514,10 @@ namespace Volian.Print.Library
|
|||||||
PdfPTable gtbl = new PdfPTable(gcols);
|
PdfPTable gtbl = new PdfPTable(gcols);
|
||||||
while (data.Length > 0)
|
while (data.Length > 0)
|
||||||
{
|
{
|
||||||
|
int indx = data.IndexOf(";"); // B2022-111: error on summary report (data missing ';' so couldn't parse out report info)
|
||||||
|
if (indx > 0)
|
||||||
|
{
|
||||||
|
addedInfo = true;
|
||||||
string val = data.Substring(0, data.IndexOf(";"));
|
string val = data.Substring(0, data.IndexOf(";"));
|
||||||
data = data.Substring(data.IndexOf(";") + 1);
|
data = data.Substring(data.IndexOf(";") + 1);
|
||||||
Phrase hh = new Phrase();
|
Phrase hh = new Phrase();
|
||||||
@ -1521,6 +1526,11 @@ namespace Volian.Print.Library
|
|||||||
PdfPCell cc = new PdfPCell(hh);
|
PdfPCell cc = new PdfPCell(hh);
|
||||||
gtbl.AddCell(cc);
|
gtbl.AddCell(cc);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
data = ""; // couldn't find separator ';', don't continue to loop
|
||||||
|
}
|
||||||
|
if (addedInfo)
|
||||||
|
{
|
||||||
c = new PdfPCell(gtbl);
|
c = new PdfPCell(gtbl);
|
||||||
c.Colspan = cols - 4;
|
c.Colspan = cols - 4;
|
||||||
c.HorizontalAlignment = Element.ALIGN_LEFT;
|
c.HorizontalAlignment = Element.ALIGN_LEFT;
|
||||||
@ -1528,6 +1538,7 @@ namespace Volian.Print.Library
|
|||||||
//c.Border = borders;
|
//c.Border = borders;
|
||||||
t.AddCell(c);
|
t.AddCell(c);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// B2017-058: The following was added to handle when there are no grid audits, just put a message. Without
|
// B2017-058: The following was added to handle when there are no grid audits, just put a message. Without
|
||||||
// adding this cell to the output, the columns get out of sync for rest of report.
|
// adding this cell to the output, the columns get out of sync for rest of report.
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user