MicroStrategy ONE
Drilling to the Drill Path on a Report with High Importance
This example demonstrates drilling on a report using its default drill path that has high importance.
Code sample
This code sample assumes that a valid sessionID, messageID and a stateID exist for the report instance that is drilled. The drillPathID that is the ID of the drill path to be used for drilling is available as well.
try
{
//Get the WebObjectsFactory instance
WebObjectsFactory factory = WebObjectsFactory.getInstance();
factory.getIServerSession().setSessionID(sessionID);
//Gets the Report Source from the factory
WebReportSource reportSource = factory.getReportSource();
//Use the Report Source to retrieve the Web Report instance corresponding to the given messageID and stateID
WebReportInstance reportInstance = reportSource.getInstance(messageID, stateID);
//Get the drill instance for the report instance
WebDrillInstance drillInstance = reportInstance.getDrillInstance();
//Get the drill map
WebDrillMap drillMap = drillInstance.getDrillMap();
//Get the drill path with high importance
WebDrillPath drillPathWithHighImportance = drillMap.getDrillPathWithHighImportance();
//Load the drill actions that correspond to the drillPathID
drillInstance.loadActionsFromDrillPath(drillPathWithHighImportance);
//Perform the drilling and get the new report instance
WebReportInstance newReportInstance = drillInstance.drill();
}catch(WebObjectsException e) { Log.logger.log(Level.ERROR, e.getMessage);}