Hello,
I am facing a strange issue regarding the export functionality.
I would like to export a specific table from my dashboard using this script. This is the standard script from Dundas samples: https://www.dundas.com/support/developer/script-library/Export/Export-Specific-Visualization-to-Excel
// Get the export service.
var exportService = this.getService(‘ExportService’);
// Get the view service.
var viewService = this.getService(‘ViewService’);
// Create the export request.
var exportRequest =
new dundas.export.ExportRequest(
{
isLegacyExport: false,
// Export Excel
providerId: dundas.constants.STANDARD_EXCEL_EXPORT_PROVIDER_ID,
viewData: this.getService(“CanvasService”).canvas.viewModel.businessObject.control
});
// Create parameter value to pass to the request.
var parameterValue = new dundas.data.CollectionStringValue();
var adapterIdsParameterId = dundas.constants.EXCEL_ADAPTERS_ID;
parameterValue.parameterId = adapterIdsParameterId;
// Set an array of adapter ids to include
// based on the value of the drop down list.
parameterValue.values = [ table3.id ];
// Push the parameter value to export request.
exportRequest.parameterValues.push(parameterValue);
var selectionParameterValue = new dundas.data.SingleNumberValue();
selectionParameterValue.parameterId = dundas.constants.EXCEL_EXPORT_SELECTION_ID;
// 3 for multiple values.
selectionParameterValue.value = 3;
exportRequest.parameterValues.push(selectionParameterValue);
// Get the perform export promise.
var exportPromise =
exportService.performExport(exportRequest);
// Setup a loading dialog.
viewService.showLoadingRestCall(exportPromise);
exportPromise.done(
function(exportId)
{
// Get the Url for the export file.
var exportFileUrl =
exportService.getExportResultUrl(exportId);
// Force the browser to download the file.
window.location.replace(exportFileUrl);
}
);
Unfortunately, this script is not working because I am receiving this error:
VM1003:54 Uncaught TypeError: exportService.getExportResultUrl is not a function
at Object.eval (eval at h (base.min.js?v=198860040000:1420), :54:21)
at l (jquery.min.js?v=198860044000:4)
at Object.fireWith [as resolveWith] (jquery.min.js?v=198860044000:4)
at k (jquery.min.js?v=198860044000:6)
at XMLHttpRequest. (jquery.min.js?v=198860044000:6)
I am using the last version of Dundas 6, 6.0.3.1012.
What should I do in this case?
Thank you!