Mini Kabibi Habibi

Current Path : C:/Users/Public/Documents/DXperience 13.1 Demos/ASP.NET/CS/ASPxPivotGridDemos/OLAP/
Upload File :
Current File : C:/Users/Public/Documents/DXperience 13.1 Demos/ASP.NET/CS/ASPxPivotGridDemos/OLAP/Browser.aspx.cs

using System;
using System.Web.UI;

public partial class Features_OLAP : Page {	

    protected void Page_Load(object sender, EventArgs e) {
		pivotGrid.OLAPConnectionString = GetOLAPConnectionString();
        string error = OLAPConnector.TryConnect(pivotGrid);
        if(!string.IsNullOrEmpty(error)) {            
            Control errorPanel = OLAPConnector.CreateErrorPanel(error);
            pivotGrid.Parent.Controls.AddAt(0, errorPanel);
        }
	}

	protected string GetOLAPConnectionString() {
		string res = @"Provider=msolap;Initial Catalog=Northwind;Cube Name=Northwind;Data Source=|DataDirectory|\";
		if(IntPtr.Size == 4)
			res += "Northwind.cub;";
		else
			res += "Northwind64.cub;";
		return res;
	}
}