I. Overview
Sometimes, it is required to get all cell values, as shown bellow:
II. Example
2.1 Data preparation
Create a new report and add dataset ds1:
SELECT * FROM Sales_Volume where Region='North China' and Product ='Milk'
2.2 Design Report
Design the report body as follows:
2.3 Add button and click event
Add a button widget at the parameter pane,and set its name as Get all cells value. Add a Click event for the button:
JavaScript codes:
var _obj = $(".x-table tr");
var _length = _obj.length;
for(var i = 0; i < _length; i++) {
var _td = _obj.eq(i).find("td");
for(var j = 0; j < _td.length; j++) {
var _val = _td.eq(j).text();
var _tval = $.trim(_val);
if(_tval!=""){
alert(_val);
}
}
}
2.4 Show results
Save report, and select Pagination Preview. Click button Get all cells value, the browser will prompt all the cell values:
Tips:Not support mobile devices.