B2022-079: Error printed on Chronology of Changes report
This commit is contained in:
parent
6dff9463ad
commit
8b21a92729
@ -345,6 +345,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];
|
||||||
@ -356,6 +357,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-079: error on chronology 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();
|
||||||
@ -364,14 +369,19 @@ 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 added info above, i.e. no error, put out the cell
|
||||||
|
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;
|
||||||
//c.PaddingBottom = paddingBottom;
|
|
||||||
//c.Border = borders;
|
|
||||||
t.AddCell(c);
|
t.AddCell(c);
|
||||||
}
|
}
|
||||||
else
|
}
|
||||||
|
if (!addedInfo) // Didn't add info, report that data not available
|
||||||
{
|
{
|
||||||
h = new Phrase();
|
h = new Phrase();
|
||||||
h.Font = f4;
|
h.Font = f4;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user