unload();
The unload method unloads data from module.
To execute the example, open the express report in Analytics Platform web application. Make sure that the repository contains express report with the 4998 key.
Unload the current module object, open the express report with the 4998 key in the view mode, find out type of the container, to which the report is loaded, service type and data source type:
// Get current unit object var moduleObject = PP.App.getModuleObject(); // Load current data from unit moduleObject.unload(); // Determine service settings var serviceSet = { Metabase: moduleObject.getService().getMetabase() }; // Determine container settings var boxSet = { RibbonView: { DiscussMenu: { Enabled: false // Menu of the Share button is not available }, // Make the Discuss in SharePoint button available SharepointEnabled: false } } var initSet = { Key: 4998, // Express report key Mode: "view" // Express report opens only for view }; // Get container with the current form var reportBox = moduleObject.getReportBox(); console.log("Container type: " + reportBox.getTypeName()); // Get service var service = moduleObject.getService(); console.log("Service type: " + service.getTypeName()); // Get data source var source = moduleObject.getSource(); console.log("Data source type: " + source.getTypeName());
After executing the example the current module object is unloaded, and express report with the 4998 key opens in the view mode:
The browser console displays type of the container, to which the report is loaded, service type and data source type:
Container type: PP.Exp.Ui.ExpressBox
Service type: PP.Exp.EaxMdService
Data source type: PP.Exp.EaxDocument
See also: