用计算字段如 ViewValue在Dataset的OnCalcFields事件中加代码:With DataSet do begin if FieldByName('字段名').asInteger=1 then FieldByName('ViewValue').asString:='简单' eles if FieldByName('字段名').asInteger=1 then FieldByName('ViewValue').asString:='困难'; end;
用计算字段如 ViewValue在Dataset的OnCalcFields事件中加代码:With DataSet do begin if FieldByName('字段名').asInteger=1 then FieldByName('ViewValue').asString:='简单' eles if FieldByName('字段名').asInteger=1 then FieldByName('ViewValue').asString:='困难'; end;
Select (Case fieldname when 1 then '容易' else '困难' end) as fieldname from table
if FieldByName('字段名').asInteger=1 then
FieldByName('ViewValue').asString:='简单'
eles if FieldByName('字段名').asInteger=1 then
FieldByName('ViewValue').asString:='困难';
end;
if FieldByName('字段名').asInteger=1 then
FieldByName('ViewValue').asString:='简单'
eles if FieldByName('字段名').asInteger=1 then
FieldByName('ViewValue').asString:='困难';
end;
from table