y"> edit3.Clear;
DateTimePicker1.DateTime: = FirstDate;
DateTimePicker2.DateTime: = date ();;. Unit6;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComObj;
TForm6 = class (TForm)
Label1: TLabel;
Button1: TButton;
ComboBox1: TComboBox;
Label2: TLabel;
ComboBox2: TComboBox;
procedure FormShow (Sender: TObject);
procedure Button1Click (Sender: TObject);
procedure ComboBox2Select (Sender: TObject);
procedure FormClose (Sender: TObject; var Action: TCloseAction);
private
procedure UpdateCombo;
end;
Form6: TForm6; Unit2, DB, ADODB;
{$ R *. dfm} TForm6.UpdateCombo;
DataModule2.tbStudent.Filtered: = false;
DataModule2.tbStudent.Filter: = 'НГ =' + ComboBox2.Text;
DataModule2.tbStudent.Filtered: = true;
ComboBox1.Clear;
with DataModule2.tbStudent do begin
First;
while not (eof) do begin
ComboBox1.Items.Add (FieldByName ('ПІБ'). AsString);
Next;
end;
end;
ComboBox1.ItemIndex: = 0;; TForm6.FormShow (Sender: TObject);
ComboBox2.Clear;
with DataModule2.tbGruppa do begin
First;
while not (eof) do begin
ComboBox2.Items.Add (FieldByName ('НГ'). AsString);
Next;
end;
end;
ComboBox2.ItemIndex: = 0;
UpdateCombo;; TForm6.Button1Click (Sender: TObject);
var XL, Sheet: variant;
i: integer;
XL: = CreateOleObject ('Excel.Application');
XL.WorkBooks.Add;
Sheet: = XL.WorkBooks [1]. WorkSheets [1];
Sheet.Columns [1]. ColumnWidth: = 10;
Sheet.Columns [2]. ColumnWidth: = 40;
Sheet.Columns [3]. ColumnWidth: = 40;
Sheet.Cells [3, 1]: = 'Дисципліна';
Sheet.Cells [3, 2]: = 'Кількість годин';
Sheet.Cells [3, 3]: = 'Оцінка';
Sheet.Range ['A1: C1']. Merge;