Logic to include places where there are missing RO on the RO Usage Report.

This commit is contained in:
John Jenko 2015-01-13 16:31:17 +00:00
parent 2363d304aa
commit e1945e3c41
2 changed files with 22 additions and 16 deletions

View File

@ -722,7 +722,7 @@ namespace VEPROMS
{
if (args.TypesSelected == "RO Usage")
{
Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.MyItemInfoList, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROUsageReport.pdf", args.SortUsageByProcedure);
Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.MyItemInfoList, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROUsageReport.pdf", args.SortUsageByProcedure,args.IncludeMissingROs);
myReport.Build();
}
else if (args.TypesSelected == "Complete RO Report")

View File

@ -472,25 +472,31 @@ namespace VEPROMS.CSLA.Library
// Return the RO Title in a list of strings
// The last item in the list is the actual RO title, the items preceding it are the
// titles of the groups and sub-groups containing the RO
public List<string> GetROTitleAndGroupPath(string ROID)
public List<string> GetROTitleAndGroupPath(string ROID, bool reportMissingROs)
{
List<string> titlePath = new List<string>();
rochild roc = GetRoChild12(ROID);
string tmp = roc.title;
if (roc.appid != "")
if (roc.title.Contains(roc.appid))
tmp = roc.title.Replace(roc.appid, string.Format("<{0}>", roc.appid)).Trim();
else
tmp = string.Format("[{0}] {1}", roc.appid, roc.title);
titlePath.Add(tmp);
do
if (roc.appid != null)
{
string parent = ROID.Substring(0, 4) + string.Format("{0:X8}", roc.ParentID);
roc = GetRoChild12(parent);
if (roc.ID > 0)
titlePath.Add(roc.title);
} while (roc.ID > 0);
titlePath.Reverse();
string tmp = roc.title;
if (roc.appid != "")
if (roc.title.Contains(roc.appid))
tmp = roc.title.Replace(roc.appid, string.Format("<{0}>", roc.appid)).Trim();
else
tmp = string.Format("[{0}] {1}", roc.appid, roc.title);
titlePath.Add(tmp);
do
{
string parent = ROID.Substring(0, 4) + string.Format("{0:X8}", roc.ParentID);
roc = GetRoChild12(parent);
if (roc.ID > 0)
titlePath.Add(roc.title);
} while (roc.ID > 0);
titlePath.Reverse();
}
else if (reportMissingROs) // Missing RO, put a message with the ROID on the report...
titlePath.Add(string.Format("Missing RO for ROID {0}", ROID));
return titlePath;
}
public List<string> GetROTitleAndGroupPathForSummary(string ROID)