TRxDBGridExportSpreadSheet - export footer row

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3394 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2014-07-29 11:20:59 +00:00
parent 239bc2cec1
commit 5c691c8f2f

View File

@ -224,8 +224,42 @@ begin
end;
procedure TRxDBGridExportSpreadSheet.DoExportFooter;
var
i : Integer;
C : TRxColumn;
CT : TRxColumnTitle;
CC : TColor;
scColor : TsColor;
begin
CC:=FRxDBGrid.FooterOptions.Color;
FCurCol:=0;
for i:=0 to FRxDBGrid.Columns.Count - 1 do
begin
C:=FRxDBGrid.Columns[i] as TRxColumn;
CT:=C.Title as TRxColumnTitle;
if C.Visible then
begin
if (C.Footer.ValueType <> fvtNon) then
begin
FWorksheet.WriteUTF8Text(FCurRow, FCurCol, C.Footer.DisplayText);
if (CC and SYS_COLOR_BASE) = 0 then
begin
// CC:=clWhite;
scColor:=FWorkbook.AddColorToPalette(CC);
FWorksheet.WriteBackgroundColor(FCurRow,FCurCol, scColor);
end;
FWorksheet.WriteBorders(FCurRow,FCurCol, [cbNorth, cbWest, cbEast, cbSouth]);
FWorksheet.WriteBorderColor(FCurRow,FCurCol, cbNorth, scColorBlack);
FWorksheet.WriteBorderColor(FCurRow,FCurCol, cbWest, scColorBlack);
FWorksheet.WriteBorderColor(FCurRow,FCurCol, cbEast, scColorBlack);
FWorksheet.WriteBorderColor(FCurRow,FCurCol, cbSouth, scColorBlack);
FWorksheet.WriteHorAlignment(FCurRow, FCurCol, ssAligns[C.Footer.Alignment]);
end;
inc(FCurCol);
end;
end;
end;
procedure TRxDBGridExportSpreadSheet.DoExportColWidth;