Hi,
Let's say i have a report, and i only have one table in the Data Item.
and for that one table (i.e. Sales Header), my required filter field is "Sell to Customer No."
so when the user runs the report, he/she can place a filter for customer number either by typing a customer no. or by choosing through the customer list (that opens when the lookup button is clicked)
My question is, how do i set the Customer list window (when opened from the report) to show only customers that pass a certain condition, example, show only customers where Blocked = FALSE...
0
Comments
Possibility 2) Put the filter in the "OnOpenForm"-trigger.
With both every time the customer list is opened, the filter will be shown. With possibility 2, the user has the possibility to cancel the filter.
Possibility 3) change the "OnLookup"-trigger of the field in the table to put the filters you want. With this everywhere a lookup of the field is done, this code will be triggered.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
but does this apply to reports?
how do i control the filter of lookup window that is being open within the required filter field of the report?
If I need to do it in a report, in general I put that field in the options-tab. There I can control the filtering in the lookup-form by writing the code.
I have another possibility, but it requires a lot of programming.
The idea is using a singleinstance codeunit. When entering the report, I give a certain value to the codeunit and when I open the lookup-form, I check if that value is in the codeunit and if it is I put some special filters. The problem is that when I leave the report, I have to destroy that value in the codeunit. I also have to destroy it when I open the report, but then close it again.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
There are no filters on the lookup forms themselves, either in the code OnOpenForm or the SourceTableview (both empty), there is no code in the OnValidate or OnLookup triggers for those fields in the table which is the data item, and there is no code in the report OninitReport or OnPreReport triggers, and the DataItemTableView is empty. Can anyone suggest where else I should look for the source of these filters?
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!