Mini Kabibi Habibi

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

Imports Microsoft.VisualBasic
Imports System
Imports System.Web.UI

Partial Public Class Features_OLAP
	Inherits Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
		pivotGrid.OLAPConnectionString = GetOLAPConnectionString()
		Dim [error] As String = OLAPConnector.TryConnect(pivotGrid)
		If (Not String.IsNullOrEmpty([error])) Then
			Dim errorPanel As Control = OLAPConnector.CreateErrorPanel([error])
			pivotGrid.Parent.Controls.AddAt(0, errorPanel)
		End If
	End Sub

	Protected Function GetOLAPConnectionString() As String
		Dim res As String = "Provider=msolap;Initial Catalog=Northwind;Cube Name=Northwind;Data Source=|DataDirectory|\"
		If IntPtr.Size = 4 Then
			res &= "Northwind.cub;"
		Else
			res &= "Northwind64.cub;"
		End If
		Return res
	End Function
End Class