我在信息层的代码中写了个自定义函数
function TINFOHKJSJYXX.Select(DataSourceSelect: TSQLDataSet): Boolean;
var
Itype:String;
lQuery:TQuery;
begin
Itype:=DataSetHJJYCB.FieldByName('HJJYBBC_GCLB').AsString;
with DataSourceSelect do
begin
UserFilter :='parent_id='''+Itype+'''';
end;
with TXZFXGC.Create(Context) do
try
DataGrid1.DataSource := DataSourceSelect.DataSource;
Result := ShowModal = Business.Forms.Controls.mrOK;
finally
Free;
end;
end;
传入一个标准数据集参数,然后UserFilter 过滤,再赋值给DocView。可是执行的结果DataSourceSelect.DataSource对象为空,请问是哪里写的有误么?