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 !

Comments

  • edited 4:14PM
    the jpgl.frf is tested in the exe, it run normally!
    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 !

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.