111
Caption := DM.dstPlaces2.FieldByName('Наименование').AsString;
if DM.dstPlaces2.FieldByName('СетевоеИмя').AsString <> '' then
Caption := Caption + ' (' +
DM.dstPlaces2.FieldByName('СетевоеИмя').AsString + ')';
Excel.Cells[i,1] := Caption;
Excel.Cells[i,1].Font.Bold := True;
Excel.Cells[i,1].Font.Size := 12;
Inc(i);
//Заголовки столбцов:
Excel.Cells[i,2] := 'Инв. №';
Excel.Cells[i,3] := 'Устройство';
Excel.Cells[i,4] := 'Дата размещения';
Excel.Cells[i,3].ColumnWidth := 50;
Excel.Cells[i,2].Font.Bold := True;
Excel.Cells[i,3].Font.Bold := True;
Excel.Cells[i,4].Font.Bold := True;
Inc(i);
DM.dstDevicesAtPlace.First;
//Цикл по устройствам на раб. месте:
while not DM.dstDevicesAtPlace.Eof do
begin
Excel.Cells[i,2] := FormatFloat('0000',
DM.dstDevicesAtPlace.FieldByName('ИнвN').AsInteger);
Excel.Cells[i,3] :=
DM.dstDevicesAtPlace.FieldByName('Устройство').AsString;
Excel.Cells[i,4] := DM.dstDevicesAtPlace.FieldByName('Дата').AsString;