Array Dimensions

Normajm
Normajm Member Posts: 82
There is a report (Aged Accounts Receivable-#10040) that creates four columns via arrays. I want to increase that to six columns as we need to show overdues of 61 to 90 and over 90 based on 30D. I created a copy of it and when I change the C/AL Globals properties/dimensions for AmountDue from 4 to 6 I get an error, "Array dimensions should be identical". How do I find out what they should be identical to so I can make the appropriate changes?

We are using Nav 5.0 SP1 Cside

Thank you

Comments

  • Savatage
    Savatage Member Posts: 7,142
    How about all the c/al code & functions like
    CalcPercents(Total : Decimal;Amounts : ARRAY [4] OF Decimal)
    did you change that too and all other references to 4?
  • matttrax
    matttrax Member Posts: 2,309
    Export the file as text and search for ARRAY. Easiest way to find everything.
  • Normajm
    Normajm Member Posts: 82
    Harry,

    Yes, I did see this line and had a hunch that was the problem In my Access experience, I would call this a Function, how is it referenced in Nav so I can edit it? It's not on the C/AL Globals as code, but I do see it in the C/AL Symbols list but clicking on it there takes me to that area in the code. I tried properties and right clicking on it in the code, but no go.

    Thanks
  • matttrax
    matttrax Member Posts: 2,309
    If you view global variable there is a function tab. On that tab there is a button Locals for the variables local to that function. You can also place your cursor in that function in the code and do View --> C/AL Locals
  • Savatage
    Savatage Member Posts: 7,142
    Normajm wrote:
    I want to increase that to six columns as we need to show overdues of 61 to 90 and over 90 based on 30D.

    Isn't that what the columns already do if you set the days to 30D

    1) 1-30
    2) 31-60
    3) 61-90
    4) 90+
  • Normajm
    Normajm Member Posts: 82
    Found it. Thank you!

    As to the other question, if I did 30D I got the following result:

    Current -- Up to 30 -- 31-60 -- Over 60

    Thus four columns.

    I need five columns, but wanted a sixth for good measure

    Current -- Up to 30 -- 31-60 -- 61-90 -- Over 90

    Is there a reason not to add six performance wise?
  • Normajm
    Normajm Member Posts: 82
    Thank you all for your support. The report output now is just how we need it.
  • Savatage
    Savatage Member Posts: 7,142
    Normajm wrote:
    As to the other question, if I did 30D I got the following result:
    Current -- Up to 30 -- 31-60 -- Over 60

    This is because you selected Aged By "Due Date" on the options tab.

    If you use trans date or doc date - it changes to show over 90.