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, GetInnerFirstEntryFormulas); }
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) { AddCellToFormula(FormulaNamesEnum.Balance220330RelativeLosses.GetFormulaUid(), InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.SaldoSumm], UsedRows, GetInnerFirstEntryFormulas(FormulaNamesEnum.Balance220330SaldoSummary.GetFormulaUid()).DoubleRepresentation(), EnumExcelFormulaOperators.Minus); } AddCellToFormula(FormulaNamesEnum.Balance220330AllOutputSummary.GetFormulaUid(), InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.OutputSumm], GetUsedRows(), GetInnerFirstEntryFormulas(FormulaNamesEnum.Balance220330OutputSummary.GetFormulaUid()).DoubleRepresentation(), EnumExcelFormulaOperators.Plus); AddCellToFormula(FormulaNamesEnum.Balance220330AllSaldoSummary.GetFormulaUid(), InternalData.HeaderColumnNumbers[HeaderBal0LogicalParts.SaldoSumm], GetUsedRows(), GetInnerFirstEntryFormulas(FormulaNamesEnum.Balance220330SaldoSummary.GetFormulaUid()).DoubleRepresentation(), EnumExcelFormulaOperators.Plus); SetBorderAllCellsInBlock(xls, Color.Gray, TFlxBorderStyle.Dotted); }