How could this happened!
I using the fastreport to design report!
like this :
procedure Tcxf.BitBtn13Click(Sender: TObject);
var s:STRING;
tablestr:string;
begin
s:='1<>0';
tablestr:='sr';
if lbcheck.Checked=true then
begin
s:=s+' and JPLB="'+''+jplb.text+''+'"';
end;
if qjpcxcb1.Checked=true then
begin
s:=S+' AND JPID="'+''+CJPH.TEXT+''+'"';
end ;
if qjpcxcb2.checked=true then
begin
S:=S+' AND JPLS<="'+''+DATETOSTR(DATETIME3.DATE)+''+'"';
S:=S+' AND JPLS>="'+''+DATETOSTR(DATETIME2.DATE)+''+'"';
end;
if qjpcxcb3.checked=true then
begin
S:=s+' AND JPLD="'+''+LPD2.TEXT+''+'"';
S:=S+' AND JPZL LIKE"%'+''+JPZL.TEXT+''+'%"';
end;
if jpzt.checked=true then
begin
s:=s+' AND jpzt="'+''+jpztcob.text+''+'"';
end;
screen.cursor:=crsqlwait;
lrdata.comom.CLOSE;
lrdata.comom.SQL.CLEAR;
lrdata.comom.sql.add('exec CX '+''''+tablestr+''','''+s+'''');
lrdata.comom.open;
screen.Cursor:=crdefault;
if lrdata.comom.RecordCount=0 then
begin
exit;
end;
wpath:=extractfilepath(paramstr(0));
cxf.frReport1.LoadFromFile(wpath+'jpgl.frf');
cxf.frDBDataSet1.Datasource:=lrdata.scomom;
cxf.frReport1.Dataset:=cxf.frDBDataSet1;
//frReport1.FindObject('Memo16').Memo.Text:='recorder:'+n;
cxf.frReport1.ShowReport;
end;
//but when the button is clicked ,the error "the lrdata.comom.jpid not defined!
I use fr2.5 in delphi7, how could i solve it !
like this :
procedure Tcxf.BitBtn13Click(Sender: TObject);
var s:STRING;
tablestr:string;
begin
s:='1<>0';
tablestr:='sr';
if lbcheck.Checked=true then
begin
s:=s+' and JPLB="'+''+jplb.text+''+'"';
end;
if qjpcxcb1.Checked=true then
begin
s:=S+' AND JPID="'+''+CJPH.TEXT+''+'"';
end ;
if qjpcxcb2.checked=true then
begin
S:=S+' AND JPLS<="'+''+DATETOSTR(DATETIME3.DATE)+''+'"';
S:=S+' AND JPLS>="'+''+DATETOSTR(DATETIME2.DATE)+''+'"';
end;
if qjpcxcb3.checked=true then
begin
S:=s+' AND JPLD="'+''+LPD2.TEXT+''+'"';
S:=S+' AND JPZL LIKE"%'+''+JPZL.TEXT+''+'%"';
end;
if jpzt.checked=true then
begin
s:=s+' AND jpzt="'+''+jpztcob.text+''+'"';
end;
screen.cursor:=crsqlwait;
lrdata.comom.CLOSE;
lrdata.comom.SQL.CLEAR;
lrdata.comom.sql.add('exec CX '+''''+tablestr+''','''+s+'''');
lrdata.comom.open;
screen.Cursor:=crdefault;
if lrdata.comom.RecordCount=0 then
begin
exit;
end;
wpath:=extractfilepath(paramstr(0));
cxf.frReport1.LoadFromFile(wpath+'jpgl.frf');
cxf.frDBDataSet1.Datasource:=lrdata.scomom;
cxf.frReport1.Dataset:=cxf.frDBDataSet1;
//frReport1.FindObject('Memo16').Memo.Text:='recorder:'+n;
cxf.frReport1.ShowReport;
end;
//but when the button is clicked ,the error "the lrdata.comom.jpid not defined!
I use fr2.5 in delphi7, how could i solve it !
Comments
but if it is used in dll , the error will happened like the upper!
the mdi window is stored in dll.
how could help me !