Hi All:
I'm trying to set a dynamic filter for a report based on the record number (Customer No.) - I"ve put the following code in the ' Customer - PreDataItem" trigger'
Setfilter("No.", Rec."No.");
However, it doesn't compile because of the undeclared 'Rec' variable. How do I set a dynamic filter for report without using the Request Form?
Thanks in advance..
0
Answers
Think you got the parameters mixed up
ERP Consultant (not just Navision) & Navision challenger
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
That's exactly what i'm trying to do..
however, how do I intialize a record on predataitem trigger?..
when I try the following code, it only picks up the first record and not the customer record (form) i'm on when I try to run the report.
*** Customer - OnPreDataItem() ****
Customer.GET("No.");
SETFILTER("No.", "No.");
********************************
The above doesn't work because it still doesn't intialized the record. I've tried putting this in the *** Customer - OnAfterGetRecord *** trigger also, but it keeps getting me the first record in the table. How do I initalize so that I filter on the current customer number? :roll:
Thanks in advance.. !
I used a single instance codeunit to share the selected record number - and to used this to set the filter for the report.