protected override void RenderFooter(ExtendedXlsFile xls)
        {
            UsedRows++;
            xls.SetCellValueStyled(UsedRows, InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.BalPartName], "Всего по " + Data.Name, TFlxFontStyles.Bold);
            xls.MergeCells(UsedRows,
                           InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.BalPartName],
                           UsedRows,
                           InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.InputSumm] - 1);

            RenderSummaryBehavior behav = new RenderSummaryBehavior(this, TFlxFontStyles.Bold);

            behav.RenderSummary(xls, GetInnerFirstEntryFormulas);
            if (Data.IsGroupUseInGeneralBalance)
            {
                behav.AddSummaryFormulas(xls, GetInnerFirstEntryFormulas);
            }

            if (Data.IsGroupUseInRelative)
            {
                UsedCols = InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.InputSumm] - 1;
                for (int i = 0; i < InternalData.NumbersValues; i++)
                {
                    UsedCols++;
                    AddCellToFormula(InternalData.IntervalFormulUids[i].SummBalPartSaldoForLossesDivider,
                                     UsedCols + 2, GetUsedRows(), GetInnerFirstEntryFormulas(InternalData.IntervalFormulUids[i].SummSaldoForPs).DoubleRepresentation(), Model.Formula.EnumExcelFormulaOperators.Minus);
                    UsedCols++;
                    UsedCols++;
                }
            }

            SetBorderAllCellsInBlock(xls, Color.Gray, TFlxBorderStyle.Dotted);
        }
Example #2
0
        protected override void RenderFooter(ExtendedXlsFile xls)
        {
            xls.SetRowOutlineLevel(StartRow + 1, UsedRows, 1);

            UsedRows++;
            xls.SetCellValueStyled(UsedRows, NestingLevel, "Итого по " + Data, TFlxFontStyles.Bold);
            xls.MergeCells(UsedRows, NestingLevel, UsedRows, InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.InputSumm] - 1);

            RenderSummaryBehavior behav = new RenderSummaryBehavior(this, TFlxFontStyles.Bold);

            behav.RenderSummary(xls, GetInnerFirstEntryFormulas);
            //behav.AddSummaryFormulas(xls);
        }