Trial Balance By Period

Hello Folks,

In Navision, when we run the report Trial Balance by Period (ID-38) it doesn't show the values in the Last  month of the Fiscal closing, in our case it's December 31st. It shows me for all months except for the month of the December. However, I can view it via Account Schedules. I'm now refering to Nav 5.0 Version.

Any Idea?? Thanks in Advance.





  • Seems to be a bug in Report 38...

    I looked in v4.03 of this report - it simply doesn't calculate last column (for December).

    Last column's source is ColumnValuesAsTextIdea, where i should be 13, but loop is
    FOR i := 2 TO MaxCount

    and stops on 12.

    Strange, that such an obvious bug remained uncorrected in next version (5), too... How to correct it nicely, you must examine further, because variable MaxCount is used in many places there, its not that simple. However, there should already exist corrected versions of R38 - this simply couldn't be gone unmentioned in Service Packs...

  • In reply to Modris Ivans:

    Thanks Modris, I noticed it in Version 4.0 as well but expected this to be fixed in Version 5.0 but it remained unfixed. Perhaps in Version 6.0 (2009) Version.



  • In reply to Blue Sky:


    It has been corrected in NAV2009, by setting maxcount to 13.

    In G/L Account - OnPreDataItem trigger you'll find this code:
    IF MaxCount > 12 THEN
      MaxCount := 12;

    In NAV2009 this has been changed to:
    IF MaxCount > 13 THEN
      MaxCount := 13;

    I just tried applying the same change in a 4.0 SP3 version, and had all collumns printed with figures.
    (And i also checked that the correct values were calculated)

    I must emphasize though that trying this solution, calls for a lot of additional checks.
    Much better to try and find an official fix.



  • In reply to Alexander Pallesen:


    I noticed MaxCount is used in several other places in different context - I was afraid that simple change you offer could cause some side effects, not being a real C/AL programmer actually, I only pointed out what I've found for others to check more thoroughly...

  • In reply to Modris Ivans:


    I totally agree with you.
    Which is also why i suggested your thread as solution, specially the "Must be fixed in a hotfix or so"-part. Wink

    I only tried it out for the fun, and then checked the numbers in last collumn.
    But if other errors occurs i haven't checked.

    I did compare the 4.0 object with the 2009 object in a text-compare tool.
    From just running through the differences quickly, it seems that the all other changes relate to layout and new application-functionality.