问题
Using JavaScript, how to get a Table data and store it in an array, so that it can be used by different report item.
For example, I need to use a table's specific (single) cell data and display it using another report item.
回答1:
You can just assign data set field (or anything) to a global JavaScript variable and use it in another report item.
Having:
+----
|table
+----
+----
|dynamic text
+----
in Table onCreate
-- initialize array:
myArray = new Array();
in Table row onCreate
-- fill in the array:
myArray.push(row['MYCOLUMN']);
in DynamicText value -- use it:
myArray[0]
来源:https://stackoverflow.com/questions/6216057/use-a-tables-specific-single-cell-data