Курсовая работа: Система учёта бракованной продукции (MSAccess, Delphi, ER-Win)
№ п/п | Наименование | Январь | Февраль | Март | Апрель | Май | Июнь | Июль | Август | Сентябрь | Октябрь | Ноябрь | Декабрь | Всего за 2008 г. |
2 | Пузырь | 0 | 1 | 0 | 17 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 |
3 | Расслоение | 0 | 0 | 0 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 |
4 | Засор | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5 | Подъем | 0 | 6 | 0 | 33 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 |
6 | Отскок | 5 | 13 | 0 | 51 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 |
7 | Цек | 1 | 12 | 0 | 61 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 |
8 | Темн. точки | 0 | 12 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 |
9 | Ржав. точки | 0 | 0 | 0 | 19 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 |
10 | Наплыв | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
11 | Укол | 0 | 3 | 0 | 10 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 13 |
12 | Укол п\исправл. | 0 | 0 | 0 | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 |
13 | Потертость от упаковки | 12 | 3 | 3 | 24 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 42 |
14 | Без ножки | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
15 | Трещина борта | 3 | 0 | 0 | 5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 |
16 | Нарушен. услов. хранения | 0 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 |
17 | Бой отливки | 12 | 9 | 13 | 7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 |
18 | Бой эмали | 20 | 50 | 18 | 27 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 |
19 | Потертость эмали | 34 | 73 | 32 | 60 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 199 |
20 | Соотв. сорту | 0 | 5 | 0 | 9 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 |
ВСЕГО ВАНН | 87 | 191 | 66 | 340 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 684 | |
Инженер по рекламациям _____________________________ Соловьева С.В. |
Приложение3. Исходный код компонента, реализующего обмен с MS EXCEL для создания отчётности
unit lipExcel;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Controls,
Dialogs, ComCtrls, ComObj;
type
TlipExcel = class(TComponent)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
Function Excel_open(Filename:string; List:integer):integer;
procedure Excel_Prn;
procedure Excel_Set(x,y:integer;Val:variant);
procedure Excel_Out(Filename:string;Fileformat:integer);
function Excel_Get(x,y:integer):variant;
procedure Excel_List(List:integer);
procedure Excel_Link(x,Adres:variant);
procedure Excel_Save(Filename:string;Fileformat:integer);
procedure Excel_ADD(y:integer);
procedure Excel_Color(x,y:integer;color:integer);
procedure Excel_Show(visible:boolean);
published
{ Published declarations }
end;
var
XL, WB, WS: Variant;
Was: boolean;
c: integer;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('Lipka13', [TlipExcel]);
end;
Function TlipExcel.Excel_open(Filename:string; List:integer):integer;
var
f:file;
begin
if not fileexists(Filename) then
if filename='' then filename:='Default' else exit;
try
// Excel уже запущен?
XL:=GetActiveOleObject('Excel.Application');
Was:= true;
except
// Hет, еще нет...
try
XL:=CreateOleObject('Excel.Application');
Was:= false;
except
ShowMessage('Не удалось запустить Excel');
Abort;
end;
end;
if filename='Default' then XL.Workbooks.add else XL.Workbooks.open(Filename);
c:= XL.Workbooks.Count;
WB:= XL.Workbooks[c];
WS:= WB.Worksheets[list];
result:=WB.Worksheets.Count;
end;
procedure TlipExcel.Excel_List(List:integer);
begin
WS:= WB.Worksheets[list];
end;
procedure TlipExcel.Excel_Show(visible:boolean);
begin
XL.visible:=visible;
end ;
procedure TlipExcel.Excel_Prn;
begin
WS.printout;
end;
procedure TlipExcel.Excel_ADD(y:integer);
begin
WS.Rows[y].Copy;
WS.Rows[y].Insert(1);
//WS.Range['A'+IntToStr(y),CHR(64 + 4 )+ IntToStr(y)].Insert(1);
end;
procedure TlipExcel.Excel_Set(x,y:integer;Val:variant);
begin
WS.Cells[y, x].Value:=val;
end;
procedure TlipExcel.Excel_Color(x,y:integer;color:integer);
begin
WS.Cells[y, x].Interior.ColorIndex:=color;
end;
procedure TlipExcel.Excel_Link(x,Adres:variant);
begin
ws.Hyperlinks.Add(ws.Range[x, EmptyParam],Adres,EmptyParam)
end;
function TlipExcel.Excel_Get(x,y:integer):variant;
begin
Result:=WS.Cells[y, x].Value;
end;
procedure TlipExcel.Excel_Out(Filename:string;Fileformat:integer);
begin
xl.DisplayAlerts := False;
try
if filename<>'' then wb.saveas(Filename,Fileformat);
wb.saveas(ExtractFilePath(Application.exename)+'reportsxls\'+savedate(form2.DateTimePicker1.Date)+'.xls', 1);
finally
WB.Close;
xl.DisplayAlerts := True;
if not Was then XL.Quit;
WS := null;
WB := null;
xl := null;
end;
end;
procedure TlipExcel.Excel_Save(Filename:string;Fileformat:integer);
begin
xl.DisplayAlerts := False;
try
wb.saveas(Filename,Fileformat);
wb.saveas(ExtractFilePath(Application.exename)+'reportsxls\'+savedate(form2.DateTimePicker1.Date)+'.xls', 1);
finally
xl.DisplayAlerts := True;
end;
end;
end.