EaxMdService.doFetchData

Syntax

doFetchData(report: PP.Exp.EaxAnalyzer, callback: PP.Delegate, fromDimKey: Number);

Parameters

report. Express report to be updated.

callback. Callback function to get report metadata.

fromDimKey. Dimension starting from which selection is changed.

Description

The doFetchData method refreshes express report data, the data that has been changed but not saved, will be lost.

Example

Executing the example requires that the HTML page contains the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component), and a table that includes D3 cell must be open. Change value of this cell and next refresh all express report data without saving the changes:

// Get express report table
var gridView = expressBox.getDataView().getGridView();
// Set value for table cell
gridView.setCellValue(12, 2, 2);
// Prepare cell coordinates
var coord = new PP.Ui.TabSheetCoord({
    rowIndex: 3,
    colIndex: 3
});
// Declare callback function
var callback = function () {
    gridView && gridView.getSource().getMetadata() && gridView.refreshAll()
};
// Get cell value
var value = gridView.getTabSheet().getModel().getCell(coord).getValue();
console.log("Value of the D3 call before refresh: " + value);
// Refreshes data in express report without saving changes
expressBox.getService().doFetchData(expressBox.getSource(), PP.Delegate(callback, expressBox));
// Refresh express report table
gridView.refreshAll();
// Get new cell value
value = gridView.getTabSheet().getModel().getCell(coord).getValue();
if (value != null & value != undefined & value != "") {
    console.log("Value of the D3 cell after refresh: " + value);
} else {
    console.log("Value of the D3 cell after refresh is not determined");
};

After executing the example value of D3 cell with the coordinates (3, 3) (numbers starting with zero) is set to 12. Then the express report is refreshed without saving the changes, and thus unsaved value is lost:

Value of D3 cell before refreshing: 12

Value of D3 cell after refreshing is not defined

See also:

EaxMdService