Category / Section
How to load the data for the OlapGrid from an XML file
We can able to load the data for the OlapGrid from an XML file. This can be achieved by using “LoadReportDefinitionFile” function in OlapDataManager.
Please refer the following code snippet.
C#
try
{
ViewModel.ViewModel.ConnectionString = this.GetConnectionString();
InitializeComponent();
this.olapGrid1.OlapDataManager.LoadReportDefinitionFile("C:\\Users\\niranchana\\Desktop\\Report1.xml"); //Please give the Xml report’s location
this.olapGrid1.OlapDataManager.LoadReport(this.olapGrid1.OlapDataManager.Reports[0].Name);
}
catch (Exception ex)
{
ShowExceptionMessage(ex);
}