Пример #1
0
        private void AddFooterRow(ReportRowCollection rows)
        {
            if (_totals.Count == 0)
            {
                return;
            }

            var footerRow = new ReportRow(this, ReportRowType.FooterRow, null);

            foreach (var total in _totals)
            {
                footerRow[total.Key] = string.Format(total.Key.DataFormatString, total.Value);
            }

            foreach (var field in DataFields.Where(field => !string.IsNullOrEmpty(field.FooterText)))
            {
                footerRow[field.Name] = field.FooterText;
            }

            rows.Add(footerRow);
        }