Report only recognizes one closing entry per dimension

AlexWileyAlexWiley Member Posts: 230
I've created a report and I did something wrong- the report is supposed to show my my trial balance by dimension (department/division). However, if there is more than one closing date entry for a single combination of department/division, it only recognizes the first one. Can someone tell me where I went wrong? Has anyone seen this before?

Comments

  • Alex_ChowAlex_Chow Member Posts: 5,063
    Are you using the FINDFIRST or FIND('-')? Or looping it through using the Ledger Entry Dimension table?
  • AlexWileyAlexWiley Member Posts: 230
    Sorry my first post is worded strangely; what is happening is that it is pulling the closing dates to the report when it should be ignoring them. If I set my date range for P12 the report will show some closing entries, but there is no logic (that I can see) to how it is selecting which ones it displays on the report and which are ignored. Two entries can be identical in all ways besides their amount and in Test if I change the Entry No. to make the 'visable' entries before or after the 'invisable' entries it makes no changes, so it's not based on order of appearance in the table.

    This is the code:
    WITH "G/L Account" DO BEGIN
      SETFILTER("Date Filter",GLDateFilter);
      SETRANGE("Global Dimension 1 Filter","G/L Entry"."Global Dimension 1 Code");
      SETRANGE("Global Dimension 2 Filter","G/L Entry"."Global Dimension 2 Code");
      IF GLDateFilter <> '' THEN
        IF GETRANGEMIN("Date Filter") <> 0D THEN BEGIN
          SETRANGE("Date Filter",0D,CLOSINGDATE(GETRANGEMIN("Date Filter") - 1));
          CALCFIELDS("Net Change");
          SETFILTER("Date Filter",GLDateFilter);
    


    After testing it some more, it is actually randomly selecting closing dates to pull to the report. If there are 5 closing entries in the g/l entry table for one combination of account/dimension it will pull the 2nd, 3rd, and 4th lines into the report, and the first and last entry will not be listed on the report (no closing entries should appear on the report). Sorry again for the poor wording the first time.
Sign In or Register to comment.