bug in debugger

Karenh
Member Posts: 209
I recently wasted a number of hours chasing what I thought was a filter problem. It turns out to be a debugger problem. It occurred in version 4.0 (no service pack) and I duplicated it in 4.0 sp2.
Code in on prereport trigger:
SalesInvHeader.SETRANGE("Shortcut Dimension 1 Code",'SALES');
SalesCMHeader.SETRANGE("Shortcut Dimension 1 Code",'SALES');
SalesBuffer2.COPYFILTER("Posting Date",SalesInvHeader."Posting Date");
SalesBuffer2.COPYFILTER("Posting Date",SalesCMHeader."Posting Date");
SalesBuffer2.COPYFILTER("Sell-to Customer No.",SalesInvHeader."Sell-to Customer No.");
SalesBuffer2.COPYFILTER("Sell-to Customer No.",SalesCMHeader."Sell-to Customer No.");
I stepped through the code in the debugger, and view Global variables in the debugger with the Table Filter item expanded so that I can watch the filters as they are applied. From the display, it appears that on the COPYFILTER after the SETRANGE, the Posting Date filter gets placed in the Shortcut Dimension field.
The issue was confirmed by Microsoft support and reported to development.
This is an FYI. I had searched here for report debugger problems and did not find this.
Code in on prereport trigger:
SalesInvHeader.SETRANGE("Shortcut Dimension 1 Code",'SALES');
SalesCMHeader.SETRANGE("Shortcut Dimension 1 Code",'SALES');
SalesBuffer2.COPYFILTER("Posting Date",SalesInvHeader."Posting Date");
SalesBuffer2.COPYFILTER("Posting Date",SalesCMHeader."Posting Date");
SalesBuffer2.COPYFILTER("Sell-to Customer No.",SalesInvHeader."Sell-to Customer No.");
SalesBuffer2.COPYFILTER("Sell-to Customer No.",SalesCMHeader."Sell-to Customer No.");
I stepped through the code in the debugger, and view Global variables in the debugger with the Table Filter item expanded so that I can watch the filters as they are applied. From the display, it appears that on the COPYFILTER after the SETRANGE, the Posting Date filter gets placed in the Shortcut Dimension field.
The issue was confirmed by Microsoft support and reported to development.
This is an FYI. I had searched here for report debugger problems and did not find this.
0
Comments
-
Yes I've seen this bug. What I usually do is that I don't open the filter details until all the filters are set. Then I will see all the correct filters.
I also see in debugger, where you start putting filter on a variable, but in watch list it shows as uninitialized.0
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
- 322 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