14-05-2012, 03:59 PM
السلام عليكم
تفضل أخي،
قم بتغيير :
Table1 = إلى اسم الجدول اي تستعمله
Table1No_Total= اسم حقل المجموع
Table1No_T= اسم حقل التكرار
Table1No_Aha= اسم حقل الأهمية
Table1No_So= اسم حقل الصعوبة
تفضل مشروع التطبيقي للتجربة
تفضل أخي،
قم بتغيير :
Table1 = إلى اسم الجدول اي تستعمله
Table1No_Total= اسم حقل المجموع
Table1No_T= اسم حقل التكرار
Table1No_Aha= اسم حقل الأهمية
Table1No_So= اسم حقل الصعوبة
كود :
// لحساب المجموع الفردي والكلي
var
TotalMad,Prec:Double;
begin
Table1.First;
TotalMad:=0;
while not Table1.Eof do
begin
Table1.Edit;
Table1No_Total.Value:=Table1No_T.Value+Table1No_Aha.Value+
Table1No_So.Value;
Table1.Post;
TotalMad:=TotalMad+Table1No_Total.Value;
Table1.Next;
end;
// لحساب النسبة الموزونة
Table1.First;
while not Table1.Eof do
begin
Prec:=0;
Prec:=Table1No_Total.Value/TotalMad*100;
Table1.Edit;
Table1Procentage.Value:=Round(Prec);
Table1.Next;
end;
