Reporting: There is no * within the filter
regnor
Member Posts: 4
Hi everyone!
I'm not "the" Navision expert so please be nice to me
In my company I have to create or modify reports in Navision 2009 from time to time. I had a training on how to create reports and learned very much from existing reports, books and the internet.
Till now every report worked fine, but I'm always having problems when trying to query a record which doesn't exist.
For example in my current report I want to look up if a "Sales"-Entry exists in the "Item Ledger Entry" table; if it does then I want it to get exported, if it doesn't of course there's nothing to export.
So in C/AL I'm filtering on the "Serial No." and the ""Entry Type"::Sale"; then with "FIND" I want to get the record. Now if the record exists then there's no problem, but if it doesn't I'm getting the error "There is no Item Ledgery Entry within the filter".
I have already found out that I'll have to handle the return value from "FIND" so I included an "IF"-condition for true and false return values but I'm still getting this error message.
So now my question: How can I omit the false return message?
Best regards,
Max
I'm not "the" Navision expert so please be nice to me
In my company I have to create or modify reports in Navision 2009 from time to time. I had a training on how to create reports and learned very much from existing reports, books and the internet.
Till now every report worked fine, but I'm always having problems when trying to query a record which doesn't exist.
For example in my current report I want to look up if a "Sales"-Entry exists in the "Item Ledger Entry" table; if it does then I want it to get exported, if it doesn't of course there's nothing to export.
So in C/AL I'm filtering on the "Serial No." and the ""Entry Type"::Sale"; then with "FIND" I want to get the record. Now if the record exists then there's no problem, but if it doesn't I'm getting the error "There is no Item Ledgery Entry within the filter".
I have already found out that I'll have to handle the return value from "FIND" so I included an "IF"-condition for true and false return values but I'm still getting this error message.
So now my question: How can I omit the false return message?
Best regards,
Max
0
Comments
-
You can use
IF FIND...
To omit the error message.0 -
"IF FIND" doesn't work. I'm still getting the error message.
IF templedge.FIND THEN BEGIN END;
0 -
regnor wrote:"IF FIND" doesn't work. I'm still getting the error message.
IF templedge.FIND THEN BEGIN END;
- You are likely not getting the error message from that statement.
- Can you carry on the same whether your FIND statement succeeded or failed?
- Did you really intend to do a FIND('=') ('=' is the default if nothing is specified explicitly)?
0 -
Run with the debugger active, It must be another FIND that you have (without an IF) that is causing the error.0
-
Shame on me...you were right.
For debugging I applied a filter on my report so that only one serial number is processed and suddenly the report ran without any error. So I've looked closer at my code and found the cause; it was the "setrange"-filter which I applied in order to find the "sale"-entry. I forgot to reset it so at the next data item it was still applied and an other "FIND"(without if) failed.
So I just had to reset the filter at the end of my code and the report worked as desired.
Thank you very much for your help!0
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
- 610 NAV Courses, Exams & Certification
- 1.9K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 251 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

