C
chouce
Unregistered / Unconfirmed
GUEST, unregistred user!
数据可以显示在dbgrid里面,每次执行到 frreport1.DesignReport 就提示 material:No sql statement available. (奇怪,怎么会提示material表,而不是clxm表)
所有动态报表都无法得到dataset
frreport1对应frDBDataSet1组件,frDBDataSet1的dataset设置为adoquery1 。
Frreport1.clear;
//好像没有这个clear Frreport1.dataset.clear;
with adoquery1do
begin
close;
sql.Clear;
sql.Add('select * from clxm');
open;
frreport1.LoadFromFile('111.frf');
frreport1.DesignReport;
end;
报错定位在fr_class里面的这里 frGetFieldNames(DataSet, sl);
procedure TfrDataDictionary.GetFieldList(DSName: String;
List: TStrings);
var
i: Integer;
s: String;
sl: TStringList;
DataSet: TfrTDataSet;
begin
sl := TStringList.Create;
DataSet := frGetDataSet(DSName);
if DataSet = nil then
begin
DSName := GetRealDataSetName(DSName);
DataSet := frGetDataSet(DSName);
end;
if DataSet <> nil then
try
frGetFieldNames(DataSet, sl);
///////////报错定位在这里///////////
except;
end;
i := 0;
while i < sl.Countdo
begin
if FieldAliases.IndexOf(DSName + '.' + sl) <> -1 then
begin
s := FieldAliases[DSName + '.' + sl];
if s <> '' then
sl := s
else
begin
sl.Delete(i);
Dec(i);
end;
end;
Inc(i);
end;
// sl.Sort;
List.Assign(sl);
sl.Free;
end;
用frreport1.showreport可以打开那个空白的表111.frf
所有动态报表都无法得到dataset
frreport1对应frDBDataSet1组件,frDBDataSet1的dataset设置为adoquery1 。
Frreport1.clear;
//好像没有这个clear Frreport1.dataset.clear;
with adoquery1do
begin
close;
sql.Clear;
sql.Add('select * from clxm');
open;
frreport1.LoadFromFile('111.frf');
frreport1.DesignReport;
end;
报错定位在fr_class里面的这里 frGetFieldNames(DataSet, sl);
procedure TfrDataDictionary.GetFieldList(DSName: String;
List: TStrings);
var
i: Integer;
s: String;
sl: TStringList;
DataSet: TfrTDataSet;
begin
sl := TStringList.Create;
DataSet := frGetDataSet(DSName);
if DataSet = nil then
begin
DSName := GetRealDataSetName(DSName);
DataSet := frGetDataSet(DSName);
end;
if DataSet <> nil then
try
frGetFieldNames(DataSet, sl);
///////////报错定位在这里///////////
except;
end;
i := 0;
while i < sl.Countdo
begin
if FieldAliases.IndexOf(DSName + '.' + sl) <> -1 then
begin
s := FieldAliases[DSName + '.' + sl];
if s <> '' then
sl := s
else
begin
sl.Delete(i);
Dec(i);
end;
end;
Inc(i);
end;
// sl.Sort;
List.Assign(sl);
sl.Free;
end;
用frreport1.showreport可以打开那个空白的表111.frf