/// <summary> /// Handles the DoWork event of the bw control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DoWorkEventArgs"/> instance containing the event data.</param> protected void bw_DoWork(object sender, DoWorkEventArgs e) { using (_contributionReport = new ContributionReport(ReportOptions.Current, this)) { _contributionReport.Resume = this.Resume; _contributionReport.ResumeRunDate = this.ResumeRunDate; try { _wasCancelled = false; _isRunning = true; _resultsSummary = _contributionReport.RunReport(); } catch (Exception ex) { App.LogException(ex); throw; } finally { _isRunning = false; _wasCancelled = _contributionReport.IsCancelled; } _contributionReport = null; } e.Result = _resultsSummary?.NumberOfGivingUnits > 0; }
/// <summary> /// Handles the DoWork event of the bw control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DoWorkEventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> protected void bw_DoWork(object sender, DoWorkEventArgs e) { ContributionReport contributionReport = new ContributionReport(ReportOptions.Current); contributionReport.OnProgress += contributionReport_OnProgress; _statementCount = contributionReport.RunReport(); }
/// <summary> /// Handles the DoWork event of the bw control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DoWorkEventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> protected void bw_DoWork( object sender, DoWorkEventArgs e ) { ContributionReport contributionReport = new ContributionReport( ReportOptions.Current ); contributionReport.OnProgress += contributionReport_OnProgress; var doc = contributionReport.RunReport(); if ( doc != null ) { ShowProgress( 0, 0, "Rendering PDF..." ); byte[] pdfData = doc.Draw(); e.Result = pdfData; } else { e.Result = null; } }
/// <summary> /// Handles the DoWork event of the bw control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="DoWorkEventArgs"/> instance containing the event data.</param> /// <exception cref="System.NotImplementedException"></exception> protected void bw_DoWork(object sender, DoWorkEventArgs e) { ContributionReport contributionReport = new ContributionReport(ReportOptions.Current); contributionReport.OnProgress += contributionReport_OnProgress; var doc = contributionReport.RunReport(); if (doc != null) { ShowProgress(0, 0, "Rendering PDF..."); byte[] pdfData = doc.Draw(); e.Result = pdfData; } else { e.Result = null; } }