Display the content of an Array in a report

poppinspoppins Member Posts: 647
Hi everyone,

I have a variable of type decimal which is a bidimensional array (dimensions: 50;22).
I want to display the content of this array in a report.
Do I have to put the actual indexes for each row (meaning do I have to put tab[1,1], tab[1,2], ....) to get the result? or is there another way to get the values displayed?

Thanks in advance :)

Comments

  • geordiegeordie Member Posts: 655
    You need a double for loop to display the values:
    FOR i := 1 TO ARRAYLEN(TestArray,1) DO
      FOR j := 1 TO ARRAYLEN(TestArray,2) DO
        MESSAGE(FORMAT(TestArray[i,j]);
    
  • poppinspoppins Member Posts: 647
    geordie wrote:
    You need a double for loop to display the values:
    FOR i := 1 TO ARRAYLEN(TestArray,1) DO
      FOR j := 1 TO ARRAYLEN(TestArray,2) DO
        MESSAGE(FORMAT(TestArray[i,j]);
    

    Thank you for your reply...but this is not what I meant :mrgreen:
    I was talking about the display in the layout(the sections).....
  • geordiegeordie Member Posts: 655
    poppins wrote:
    Thank you for your reply...but this is not what I meant :mrgreen:
    I was talking about the display in the layout(the sections).....

    Oh sorry! One section for every single value (so, replacing previous loops with 2 indented dataitems based on Integer table) or more values in a signle section?
  • poppinspoppins Member Posts: 647
    geordie wrote:
    poppins wrote:
    Thank you for your reply...but this is not what I meant :mrgreen:
    I was talking about the display in the layout(the sections).....

    Oh sorry! One section for every single value (so, replacing previous loops with 2 indented dataitems based on Integer table) or more values in a signle section?
    a single section, if possible :mrgreen:
  • geordiegeordie Member Posts: 655
    poppins wrote:
    a single section, if possible :mrgreen:

    So, we come back to inital question :D
    I think there only two ways: create all the texboxes with TestArray[1,1], TestArray[1,2], ... as source expression or you can use a nested FOR loop like the one I posted before for filling a unique text variable with a space o separator between each values...
Sign In or Register to comment.