logic for Reports (currently just RO Usage reports)

methods for RO Usage Reports
This commit is contained in:
2012-09-13 19:54:26 +00:00
parent cf599335a2
commit 8ffe532d44
3 changed files with 275 additions and 128 deletions

View File

@@ -85,6 +85,7 @@ namespace VEPROMS
_SelectedROFst = null;
}
InitiateSearch(false);
InitiateDisplayReports(false);
}
}
// TODO: Should the following be an info
@@ -222,6 +223,7 @@ namespace VEPROMS
displayHistory.ChronologyPrintRequest += new DisplayHistoryReportEvent(displayHistory_ChronologyPrintRequest);
displayHistory.SummaryPrintRequest += new DisplayHistoryReportEvent(displayHistory_SummaryPrintRequest);
displayHistory.AnnotationRestored += new AnnotationRestoredHandler(displayHistory_AnnotationRestored);
displayReports.PrintRequest += new DisplayReportsEvent(displayReports_PrintRequest);
this.Activated += new EventHandler(frmVEPROMS_Activated);
VlnSettings.StepTypeToolType = Settings.Default.StepTypeToolTip;
displayLibDocs.PrintRequest += new DisplayLibDocEvent(displayLibDocs_PrintRequest);
@@ -267,6 +269,7 @@ namespace VEPROMS
break;
}
}
static string _ErrorLogFileName;
public static string ErrorLogFileName
@@ -436,6 +439,21 @@ namespace VEPROMS
myReport.Build();
}
void displayReports_PrintRequest(object sender, DisplayReportsEventArgs args)
{
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);
myReport.Build();
}
else if (args.TypesSelected == "RO Report")
{
Volian.Print.Library.PDFReport myReport = new Volian.Print.Library.PDFReport(args.ReportTitle, args.RODataFile, Volian.Base.Library.VlnSettings.TemporaryFolder + @"\ROCompleteReport.pdf", args.CompleteROReport);
myReport.Build();
}
}
bool tv_InsertItemInfo(object sender, vlnTreeItemInfoInsertEventArgs args)
{
// Don't select the newly created Step. This will be handled by tmrTreeView
@@ -1736,6 +1754,24 @@ namespace VEPROMS
}
}
private void toosTabReports_Click(object sender, EventArgs e)
{
toolsPanel.Expanded = true;
InitiateDisplayReports(true);
}
private void InitiateDisplayReports(bool reportFocus)
{
if (toolsPanel.Expanded)
{
if (SelectedDVI != null)
displayReports.Mydocversion = SelectedDVI;
displayReports.advTreeProcSetsFillIn(reportFocus);
displayReports.advTreeROFillIn(reportFocus);
displayReports.SelectReferencedObjectTab(); // to enable RO selection
}
}
private void ribbonControl1_ExpandedChanged(object sender, EventArgs e)
{
Console.WriteLine("Size {0}", ribbonControl1.Expanded);
@@ -1797,7 +1833,10 @@ namespace VEPROMS
_panelExpandedChanging = false;
expandableSplitter4.Enabled = toolsPanel.Expanded;
if (toolsPanel.Expanded)
{
InitiateSearch(true);
InitiateDisplayReports(true);
}
}
private void epAnnotations_ExpandedChanged(object sender, ExpandedChangeEventArgs e)
@@ -1928,6 +1967,5 @@ namespace VEPROMS
MessageBox.Show("PROMS Error Log successfully sent to Volian support");
}
}
}
}