Setfilter with ''
madsh
Member Posts: 16
Hi u guys
I’m making a report where I’m trying to set a filter on ”item no.” like this
But I can’t get the same result ass when I use the reqFilterFields
Any one having a idea, what to do when I want to set '' as a filter in the code and not by the request form? :-k
I’m making a report where I’m trying to set a filter on ”item no.” like this
SETFILTER("Item No.",'%1','');
But I can’t get the same result ass when I use the reqFilterFields
-
Field: Item No.
Filter: ''
Any one having a idea, what to do when I want to set '' as a filter in the code and not by the request form? :-k
0
Comments
-
SETFILTER("Item No.",'%1','''');Kai Kowalewski0 -
Don't use SETFILTER in this situation - use SETRANGE
Table.SETRANGE(Field,'');
0 -
try this
setfilter("item no.",'=%1','')0 -
All solutions will do, but Torben is right that you should only use SETFILTER when SETRANGE does not do the job. If you need to combine the '' Filter with another filter or want to filter <>'', then use SETFILTER, otherwise SETRANGE.Kai Kowalewski0
-
Thanks a lot u guys =D>
The problem seemed to be I had placed my code at the trigger “Report – OnpreReport()” but as I moved it to the trigger “DataItem name – OnPreDataItem()” it solved the problem, actually all yours suggestion worked out fine as Kowa says :oops: .
Now I can’t figure if it is an advantage that I use the “Item No.” in the key at the DataItemTableView at the “DataItem” or not. Because now I’m setting the filter at the trigger after I’ve made the filter on the Reqform…
Any one who has an advice for this? :-k0
Categories
- All Categories
- 75 General
- 75 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K 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
- 611 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 253 Dynamics CRM
- 103 Dynamics GP
- 6 Dynamics SL
- 1.5K Other
- 991 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 28 Design Patterns (General & Best Practices)
- Architectural Patterns
- 9 Design Patterns
- 4 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1K General Chat
- 1.6K Website
- 77 Testing
- 1.2K Download section
- 23 How Tos section
- 249 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
