public override void Flush() { StringBuilder sb = new StringBuilder(); if (Report.DisplayHandler.Handled) { Logger.Current.Debug("account.display", () => String.Format("Account display predicate: {0}", Report.DisplayHandler.Str())); DispPred.Parse(Report.DisplayHandler.Str()); } MarkAccounts(Report.Session.Journal.Master, Report.FlatHandler.Handled); int displayed = PostedAccounts.Sum(account => PostAccount(account, Report.FlatHandler.Handled)); if (displayed > 1 && !Report.NoTotalHandler.Handled && !Report.PercentHandler.Handled) { BindScope boundScope = new BindScope(Report, Report.Session.Journal.Master); sb.Append(SeparatorFormat?.Calc(boundScope)); if (PrependFormat != null) { sb.AppendFormat(StringExtensions.GetWidthAlignFormatString(PrependWidth), PrependFormat.Calc(boundScope)); } sb.Append(TotalLineFormat.Calc(boundScope)); } Report.OutputStream.Write(sb.ToString()); }
public override void Clear() { DispPred.MarkUncomplited(); PostedAccounts.Clear(); ReportTitle = string.Empty; base.Clear(); }
/// <summary> /// Ported from void format_accounts::operator()(account_t& account) /// </summary> public override void Handle(Account account) { Logger.Current.Debug("account.display", () => String.Format("Posting account: {0}", account.FullName)); PostedAccounts.Add(account); }
public override void Handle(Account account) { PostedAccounts.Add(account); }