Using Filter
                
                    twc                
                
                    Member Posts: 28                
            
                        
            
                    Hello,
I defined a Item Tab in the Selection Dialog.
Then I save the filters in "Report - OnPreReport()":
How can I apply the filter?
I tried the following code in "Purchase Line, Body (7) - OnPreSelection()":
Does someone has an Idea?
Thank you and Regards,
Tommaso
                I defined a Item Tab in the Selection Dialog.
Then I save the filters in "Report - OnPreReport()":
re_Item.COPYFILTERS(Item);
te_ItemNoFlt := Item.GETFILTER("No.");
The Report does a loop on the "Purchase Line" table.How can I apply the filter?
I tried the following code in "Purchase Line, Body (7) - OnPreSelection()":
IF te_ItemNoFlt <> '' THEN BEGIN
  CurrReport.SHOWOUTPUT( ?????? );
END ELSE BEGIN
  re_Item.SETRANGE("No.", "Purchase Line"."No.");
  CurrReport.SHOWOUTPUT(re_Item.FIND);
END;
But I can not complete it.Does someone has an Idea?
Thank you and Regards,
Tommaso
Tommaso Cereghetti
IT-Consultant
IT-Consultant
0                
            Comments
- 
            Do you want to print the purchase lines only when the item is in the itemfilter?
The easiest way to go I think is to first put all the items in the filter in a temporary table.
Then you can skip the lines when the item is not in this temp table.0 - 
            The problem is that there are also filter on the purchase line, and I should decide whether I should print a creditor or not.
Is there a command to test if a value satisfies a given filter?Tommaso Cereghetti
IT-Consultant0 - 
            I'm affraid there is no easy function for that.
                        0 - 
            Now I use the temporary table only in case the Item."No." filter not-empty is.
Thank you very much also for the answer on the other topic!
Regards,
TommasoTommaso Cereghetti
IT-Consultant0 
Categories
- All Categories
 - 73 General
 - 73 Announcements
 - 66.6K Microsoft Dynamics NAV
 - 18.7K NAV Three Tier
 - 38.4K NAV/Navision Classic Client
 - 3.6K Navision Attain
 - 2.4K Navision Financials
 - 116 Navision DOS
 - 851 Navision e-Commerce
 - 1K NAV Tips & Tricks
 - 772 NAV Dutch speaking only
 - 617 NAV Courses, Exams & Certification
 - 2K Microsoft Dynamics-Other
 - 1.5K Dynamics AX
 - 323 Dynamics CRM
 - 111 Dynamics GP
 - 10 Dynamics SL
 - 1.5K Other
 - 990 SQL General
 - 383 SQL Performance
 - 34 SQL Tips & Tricks
 - 35 Design Patterns (General & Best Practices)
 - 1 Architectural Patterns
 - 10 Design Patterns
 - 5 Implementation Patterns
 - 53 3rd Party Products, Services & Events
 - 1.6K General
 - 1.1K General Chat
 - 1.6K Website
 - 83 Testing
 - 1.2K Download section
 - 23 How Tos section
 - 252 Feedback
 - 12 NAV TechDays 2013 Sessions
 - 13 NAV TechDays 2012 Sessions
 
