如下写法是我的代码中的用法,肯定没问题(前三个是字符型,最后一个日期型)
procedure TForm1.frxReport1GetValue(const VarName: String;
var Value: Variant);
begin
if CompareText(VarName, 'curxxmc') = 0
then
Value := xxmch;
if CompareText(VarName, 'curjhxz') = 0
then
Value := jhxzh;
if CompareText(VarName, 'curpc') = 0
then
Value := pch;
if CompareText(VarName, 'curlqrs') = 0
then
Value := lqrs;
end;