|
Re: Is row[0]==row["0"]? Or should it be? [message #132326 is a reply to message #132105] |
Fri, 17 February 2006 16:05 |
|
Peter,
Naming the column 0 is probably not very descriptive either, but
this may be a bug. Can you log a bugzilla entry?
Jason
"Peter Fopma" <peter.fopma@ifb-group.com> wrote in message
news:7b5a5fcc9cc00636e4403840314948bb$1@www.eclipse.org...
> Here is another interesting thing we found...
>
> We have a dataset where a column is named 0 (zero). Dragging the
> dataset to the reports yields a table where the above column is
> addressed as row["0"]. The preview shows the expected values.
>
> Since the data is needed for further calculation we changed the
> data element and added an assignment to a global array:
>
> theArray[rowCounter++]=row["0"];
> row["0"]
>
> I expected the preview to remain unchanged and have a copy of the
> values in the array named theArray, but...
> Now the column in the preview contains the values of the index column -
> row[0] -
> and the array is assigned with the same index values.
>
> Changing the code to
>
> theArray[rowCounter++]=row[2]; // WLOG: assuming the column named 0 is at
> index 2
> row[2]
>
> shows the correct result. Renaming the column to "Fred1" "Berta12" or
> anything that is not a number works, too.
>
> For the sane this should not be a problem since numbering metadata is not
> exactly self-explanatory. But still, I think this is not the way it is
> meant
> to work, or is it!?
>
> Thanks,
> Peter Fopma
>
|
|
|
Powered by
FUDForum. Page generated in 0.03117 seconds