Grace Cheong
17th January 2011, 08:41
Hi,

I am using arrays to store the retrieved data from select statements and wish to display the data into column by item instead of row. But, it displays all the data in multiple rows for an item. Does anyone can suggest me how to do it?

If you don't understand, please read the attached file.

Thanks.

:confused::confused:
-- Grace --

mark_h
17th January 2011, 17:37
First I would set all non-measurement array elements to 0. Then you could write a little function that would find the first none 0 array element and follow that with a little loop to go from the first none 0 number to the end of the array setting this to the first array element.

Grace Cheong
18th January 2011, 05:36
Hi Mark_h,

Yes, I did try as what you mention,but it still cannnot :(

sameer.don
18th January 2011, 11:03
Are you sure of number of columns?
I mean, will you always have 3 columns in report, or it may increase?
If possible, please post the progrma script.

cyrilchacko
18th January 2011, 17:50
Hi,

I have done something like this recently. This is what I did. I have a multi occurence display session and an array. On any choice like first, last, etc... i call display in the end.

This calls the before.display event for the fields

for my field's before.display, i add a code as

attr.element = actual.occ
Here first.elem is a long value which store the index of my first shown array index. This changes the element value and makes the new field the next array element.

You will need additional logic for navigation.

Regards,

Cyril Chacko

george7a
21st January 2011, 13:19
Can you post your code so we can understand your problem more?