Filter on the other Table

Navi_LearnerNavi_Learner Member Posts: 356
Hi Expert, I have a question and it's urgent. I created a report on Customer Ledger entry, Sales Invoice Header, line and some other tables. I created variable Customer with Data type Record of subtype Customer. I created a list of filters and they worked fine. Now I create a State filter to retrieve the list of sales in each state. The State field is not in Cust. Ledger Entry Table. So I write my code like this and put in on PreDataItem of Cust. Ledger Entry.


IF Customer.GET("Cust. Ledger Entry"."Customer No.") THEN
CustState :=CustomerTable.County;

IF FiltState <> '' THEN BEGIN

Customer.SETRANGE(Customer.County, FiltState);
END;

I put the FiltState Variable on the Request Form. But when I enter the sate in the FiltState, I can't retrieve the record on the specific State, but all the states. Expert, please advise! Thanks in advance!

Comments

Sign In or Register to comment.