示例#1
0
            private void DisplayRow(IncomeStmtRpt.Row row, bool header)
            {
                _excel.NextRow();
                _excel.NextCol(row.Text);
                foreach (var value in row.Values)
                {
                    _excel.NextCol(value);
                }
                if (_rpt.ShowMonthlyBudget)
                {
                    _excel.NextCol(row.MonthlyBudget);
                    _excel.NextCol(row.MonthlyVariance);
                }
                _excel.NextCol(" ");
                _excel.NextCol(row.TotalActual);
                _excel.NextCol(row.TotalBudget);
                _excel.NextCol(row.TotalVariance);

                if (header)
                {
                    _excel.FormatRow(new Excel.Style {
                        Bold = true
                    });
                }
            }
示例#2
0
            private void DisplaySection(string title, List <IncomeStmtRpt.Row> rows, IncomeStmtRpt.Row total)
            {
                if (rows.Count == 0)
                {
                    return;
                }

                _excel.NextRow();
                _excel.NextCol(title);
                _excel.FormatRow(new Excel.Style {
                    Bold = true, Merge = true
                }, _rpt.Columns.Count + 7);

                foreach (var row in rows)
                {
                    DisplayRow(row, false);
                }
                DisplayRow(total, true);
            }