// // New methods using the Fast-reports DLL: // This form generates a clutch of different reports. // In this method, a new FastReportsWrapper is used for each selected report type. private void GenerateAllSelectedReports(TRptCalculator ACalc) { FStatusMsg = ""; if (chkHOSA.Enabled && chkHOSA.Checked) { FStatusMsg += Catalog.GetString("\r\nAll HOSAs:"); MyFastReportsPlugin = new FastReportsWrapper("HOSA"); MyFastReportsPlugin.SetDataGetter(LoadHosaReportData); MyFastReportsPlugin.GenerateReport(ACalc); } if (chkStewardship.Enabled && chkStewardship.Checked) { FStatusMsg += Catalog.GetString("\r\nStewardship Report:"); MyFastReportsPlugin = new FastReportsWrapper("Stewardship"); MyFastReportsPlugin.SetDataGetter(LoadStewardshipReportData); MyFastReportsPlugin.GenerateReport(ACalc); } if (chkFees.Enabled && chkFees.Checked) { FStatusMsg += Catalog.GetString("\r\nFees Report:"); MyFastReportsPlugin = new FastReportsWrapper("Fees"); MyFastReportsPlugin.SetDataGetter(LoadFeesReportData); MyFastReportsPlugin.GenerateReport(ACalc); } // complex way of stepping around the Windows non-thread-safe controls problem! FStatusMsg += Catalog.GetString("\r\n\r\nReport generation complete."); this.Invoke(new CrossThreadUpdate(ShowReportStatus)); }
/// <summary> /// Print out the Hierarchy using FastReports template. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FilePrint(object sender, EventArgs e) { FastReportsWrapper ReportingEngine = new FastReportsWrapper("Duplicate Address Check"); if (!ReportingEngine.LoadedOK) { ReportingEngine.ShowErrorPopup(); return; } ReportingEngine.RegisterData(FDuplicateLocations, "DuplicateLocations"); TRptCalculator Calc = new TRptCalculator(); if (ModifierKeys.HasFlag(Keys.Control)) { ReportingEngine.DesignReport(Calc); } else { ReportingEngine.GenerateReport(Calc); } }