Options

bug in debugger

KarenhKarenh 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.

Comments

  • ara3nara3n Member Posts: 9,258
    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.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
Sign In or Register to comment.