MicroStrategy ONE

Converting a Data Mart Report to a Regular Report

The following code sample illustrates how to unset a data mart report, converting it from a data mart report instance to an instance of a regular report.

Code sample

This code sample assumes that a valid data mart report instance exists. Otherwise, it throws an exception.

   public voidunsetDatamart() throws Exception{

 

      //creates a report bean instance of a data mart report - that is, a report that has been set as a data mart report.

      //Sample code for the getReportBean method used in line 3 is provided for you in the Examples topic.

      ReportBean rb = getReportBean("Datamart Report");

 

      //clears the data mart information, converting this report instance

      //from a data mart report instance to a regular report instance

      rb.getReportInstance().clearDatamartInfo();

 

      //Applies the changes to the report bean instance

      rb.getReportInstance().getReportManipulator().applyChanges();

     }