B2017-011: Complete report, sorted by setpoint id, crashes if duplicate setpoint id
B2017-011: Complete report, don’t crash if requested ro is not in database
This commit is contained in:
parent
431503a104
commit
3e5741ef75
@ -191,7 +191,8 @@ namespace CmpRpt
|
||||
|
||||
// read in this element from the table.
|
||||
rptele = myrodb.RODB_ReadRO(tbname, recid);
|
||||
|
||||
if (rptele != null)
|
||||
{
|
||||
VlnXmlElement parent;
|
||||
string parentid;
|
||||
parentid = rptele.GetAttribute("ParentID");
|
||||
@ -240,12 +241,13 @@ namespace CmpRpt
|
||||
int cnt = reversehdrs.Count;
|
||||
for (int i = cnt - 1; i >= 0; i--)
|
||||
headers.Add(reversehdrs[i]);
|
||||
}
|
||||
myrodb.MyDBID = tbl;
|
||||
rptele.Show(myrodb, headers, showStat);
|
||||
Application.DoEvents();
|
||||
headers.Clear();
|
||||
reversehdrs.Clear();
|
||||
}
|
||||
}
|
||||
}// end foreach roid
|
||||
if (showStat != null)
|
||||
showStat.Dispose();
|
||||
|
@ -187,6 +187,10 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
rtnstr = rodbidPrefix + string.Format("{0}", roc.roid);
|
||||
keystr = ((roc.appid == "") ? GetNextBlankKey() : roc.appid) + chld.roid.Substring(0, 4);
|
||||
if (AccIDROIDdic.ContainsKey(keystr)) // For duplicates, append the parent title (B2017-011) so adding to dictionary doesn't crash.
|
||||
{
|
||||
keystr = keystr + "|" + chld.title;
|
||||
}
|
||||
AccIDROIDdic.Add(keystr, rtnstr);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user