Display the content of an Array in a report

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 :)

You can use FOR Loop for displaying the same

Thank you for your reply…but this is not what I meant
I was talking about the display in the layout(the sections)…

It depends on what you want the final output to look like in the report. If you want a single value to be printed on each line, creating a single column, then you only need to add one textbox control, and use tab(x,y) as the source expression. Then you just need to manipulate the output process to properly increment through x and w to get all of the array elements printed.

If you want to put several array elements on the same line, then you’d make multiple text boxes in that section, and you’d make the source expressions for each one so that the first would be tab(x), the second would be tab(x+1) , the third would be tab(x+2) and so on. So, if you want a section that has 20 array elements on it, you’d have 20 text box controls, and the source expression for the last box would be tab(x+19). Then you would increment x by 20 for each section until you’ve iterated through the array.

And for handling the incrementing of x and y, I usually define an Integer data item, and let Number be the value of x.

Hope that makes sense and is helpful.