OnFilterRecord/Filter(100分)

  • 主题发起人 主题发起人 shricom
  • 开始时间 开始时间
S

shricom

Unregistered / Unconfirmed
GUEST, unregistred user!
I want to print some record suitable to some conditions with
QuickRep Control.I use Paradox,According to HELP,Filter can not
be used.
I write a OnFilterRecord Event handle, but it doesnot work.

Source:

In Form1 ( T_Person:TTable):
CompanyName is defined as a public variable.
Procedure T_PersonFilterRecord(Dataset;Accept);
begin
Accept:= (T_Person.FieldByName('company').Asstring = CompanyName);
end

In Form2:
Form1.T_Person.Filtered := True;
Form1.CompanyName := CoName; // CoName defined in Form2
Form1.T_Person.Refresh;

Please help me!
 
try this:

In Form2:
Form1.T_Person.Filtered := True;
Form1.CompanyName := CoName; // CoName defined in Form2
Form1.T_Person.close;
Form1.T_Person.open;
 
Hi,Liwei

Thanks a lot!

But it still don't work! It seems that you can earn my 100 points!

Sorry!

Shricom
 
Try this:


.....Filtered:=False;
.....CompanyName:='xxxx';
.....Filtered:=True;
 
with T_Person do
begin
Filtered := False;
Filter := 'COMPANY = ''健力宝''';
Filtered := True;
Refresh; //Maybe needn't
end;
 
Form1.T_Person.Filtered := True;
Form1.CompanyName := CoName; // CoName defined in Form1.T_Person.Filtered := false;
Form1.T_Person.Filtered := True;
 
Hi,all

Thanks a lot!

But I tried it,still not work!

Could you give me some examples?

Shricom
 
I am sorry, xixi

Now I tried your way, it do work. but I don't know how to write a variable

in Filter!

Thanks

 
多人接受答案了。
 

Similar threads

I
回复
0
查看
1K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
3K
import
I
I
回复
0
查看
596
import
I
后退
顶部