.Columns [1]. ColumnWidth: = 33.43;
Sheet.Cells [3, 2]: = 'дисципліни';
Sheet.Range ['A1: C1']. Merge;
Sheet.Range ['A1: C1']. Style.HorizontalAlignment: = -4108;
Sheet.Range ['A1: C1']. Font.Bold: = true;
Sheet.Range ['A1: C1']. Value: = 'Відомість успішності';
Sheet.Range ['A2: C2']. Merge;
Sheet.Range ['A2: C2']. Value: = ComboBox1.Text;
i: = 0;
with DataModule2.tbStudent do begin
Filter: = 'НГ =' + ComboBox1.Text;
Filtered: = true;
First;
SetLength (a, RecordCount);
while not eof do begin
Sheet.Cells [i +5, 1]: = FieldByName ('ПІБ'). AsString;
a [i]: = FieldByName ('НС'). AsInteger;
inc (i);
Next;
end;
Filtered: = false;
end;
i: = 1;
with DataModule2.tbPredm do begin
First;
while not eof do begin
inc (i);
Sheet.Cells [4, i]: = FieldByName ('НП'). AsString;
Sheet.Columns [i]. ColumnWidth: = 10.43;
with DataModule2.qVed do begin
Parameters.ParamByName ('subject'). Value: =
DataModule2.tbPredm.FieldByName ('КП'). Value;
Parameters.ParamByName ('group'). Value: = ComboBox1.Text;
Active: = true;
First;
for j: = 0 to length (a) -1 do begin
x: = Lookup ('НC', a [j], 'ОЦІНКА');
if not (VarIsNull (x)) then
Sheet.Cells [j +5, i]: = round (double (x))
else
Sheet.Cells [j +5, i]: = '-';
end;
Active: = false;
end;
Next;
end;
end;
inc (i);
Sheet.Cells [4, i]: = 'Середній бал';
Sheet.Columns [i]. ColumnWidth: = 23.43;
for j: = 5 to length (a) +4 do begin
Sheet.cells [j, i]. FormulaR1C1: = '= round (AVERAGE (RC [-5]: RC [-1]), 1)';
end;
XL.Visible: = true;;
end.