/// <summary> /// Gets the string to use in the summary row by firing the FormatSummaryRow event. /// </summary> /// <returns>The string to use on the summary row.</returns> protected virtual string GetSummaryRowString() { string text = this.SummaryRowText; if (this.displayCount) { text = this.countOfValues.ToString(); } else if (this.displaySum) { text = ApplyFormat(this.sumOfValues); } else if (this.displayAvg) { double avg = this.sumOfValues / this.countOfValues; text = ApplyFormat(avg); } // Raise event for formatting FormatSummaryRowEventArgs e = new FormatSummaryRowEventArgs(); e.Field = this.Field; e.StringValue = text; if (this.FormatSummaryRow != null) { this.FormatSummaryRow(this, e); } return(e.StringValue); }
/// <summary> /// Gets the string to use in the summary row by firing the FormatSummaryRow event. /// </summary> /// <returns>The string to use on the summary row.</returns> protected virtual string GetSummaryRowString() { string text = this.SummaryRowText; if (this.displayCount) { text = this.countOfValues.ToString(); } else if (this.displaySum) { text = ApplyFormat (this.sumOfValues); } else if (this.displayAvg) { double avg = this.sumOfValues / this.countOfValues; text = ApplyFormat (avg); } // Raise event for formatting FormatSummaryRowEventArgs e = new FormatSummaryRowEventArgs(); e.Field = this.Field; e.StringValue = text; if (this.FormatSummaryRow != null) { this.FormatSummaryRow (this, e); } return e.StringValue; }