示例#1
0
        protected override void WriteRecord(IReportWriter wtr, TRecord record, TRecord previousRecord, int breakLevel)
        {
            for (int idxGroup = 0; idxGroup < GroupColumns.Count; ++idxGroup)
            {
                var column = GroupColumns[idxGroup];

                if (previousRecord == null || idxGroup >= breakLevel - 1)
                {
                    wtr.WriteCellTotal(column.GetFormattedValue(record), 1);
                }
                else
                {
                    wtr.WriteEmptyCell(1);
                }
            }

            foreach (var column in DataColumns)
            {
                wtr.WriteCell(column.GetFormattedValue(record), 1);
            }

            foreach (var column in AggregateColumns)
            {
                wtr.WriteCell(column.GetFormattedValue(record), 1);
            }
        }
示例#2
0
        protected override void WriteTotals(IReportWriter wtr, int breakLevel)
        {
            if (breakLevel > 0)
            {
                wtr.WriteEmptyCell(breakLevel);
            }
            var colSpan = GroupColumns.Count + DataColumns.Count - breakLevel;

            if (colSpan > 0)
            {
                wtr.WriteCellTotal("Total", colSpan);
            }

            for (int idxAggregate = 0; idxAggregate < AggregateColumns.Count; ++idxAggregate)
            {
                wtr.WriteCellTotal(Aggregates[breakLevel, idxAggregate].GetFormattedValue(), 1);
            }

            ClearSubtotals(breakLevel);
        }