How to get the name of the cube while loading back the saved OLAP Report?
This KB illustrates that how to get cube name while loading saved report
Solution:
You can get the cube’s name of the loaded OLAP Report (that is saved earlier) by using the following code examples.
C#
public Dictionary<string, object> LoadReportFromDB(string reportName, string olapReport, string clientReports)
{
OlapDataManager DataManager = new OlapDataManager(connectionString);
DataManager.Reports = olapClientHelper.DeserializedReports(reportString);
DataManager.SetCurrentReport(DataManager.Reports[0]);
var currentCubeName = DataManager.CurrentCubeName;
return olapClientHelper.GetJsonData("toolbarOperation", DataManager, "Load Report", reportName);
}
VB
Public Function LoadReportFromDB(ByVal reportName As String, ByVal olapReport As String, ByVal clientReports As String) As Dictionary(Of String, Object)
Dim DataManager As OlapDataManager = New OlapDataManager(connectionString)
DataManager.Reports = olapClientHelper.DeserializedReports(reportString)
DataManager.SetCurrentReport(DataManager.Reports(0))
Dim currentCubeName = DataManager.CurrentCubeName
Return olapClientHelper.GetJsonData("toolbarOperation", DataManager, "Load Report", reportName)
End Function