轉(zhuǎn)帖|其它|編輯:郝浩|2012-10-17 16:40:25.000|閱讀 359 次
概述:之前我們已經(jīng)介紹了如何用 ADOMD.NET Data Provide綁定 PivotGridControl 到OLAP多維數(shù)據(jù)集,接下來,我們換XMLA,具體代碼事例如下:
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
之前我們已經(jīng)介紹了如何用 ADOMD.NET Data Provide綁定 PivotGridControl 到OLAP多維數(shù)據(jù)集,接下來,我們換XMLA,具體代碼事例如下:
C#
using System; using System.Windows.Forms; using DevExpress.XtraPivotGrid; namespace XtraPivotGrid_XMLA { public partial class Form1 : Form { public Form1() { InitializeComponent(); } void Form1_Load(object sender, EventArgs e) { // Specifies that PivotGridControl should use the XMLA data access standard // to bind to an OLAP cube. pivotGridControl1.OLAPDataProvider = OLAPDataProvider.Xmla; // Configures a data connection. // Specifies a string that encapsulates connection parameters // required to access the desired OLAP cube. pivotGridControl1.OLAPConnectionString = "Data Source=//demos.devexpress.com/Services/OLAP/msmdpump.dll;" + "Initial Catalog=Adventure Works DW Standard Edition;Cube Name=Adventure Works"; } } }
VB
Imports Microsoft.VisualBasic Imports System Imports System.Windows.Forms Imports DevExpress.XtraPivotGrid Namespace XtraPivotGrid_XMLA Partial Public Class Form1 Inherits Form Public Sub New() InitializeComponent() End Sub Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load ' Specifies that PivotGridControl should use the XMLA data access standard ' to bind to an OLAP cube. pivotGridControl1.OLAPDataProvider = OLAPDataProvider.Xmla ' Configures a data connection. ' Specifies a string that encapsulates connection parameters ' required to access the desired OLAP cube. pivotGridControl1.OLAPConnectionString = _ "Data Source=//demos.devexpress.com/Services/OLAP/msmdpump.dll;" & _ "Initial Catalog=Adventure Works DW Standard Edition;Cube Name=Adventure Works" End Sub End Class End Namespace
本站文章除注明轉(zhuǎn)載外,均為本站原創(chuàng)或翻譯。歡迎任何形式的轉(zhuǎn)載,但請務(wù)必注明出處、不得修改原文相關(guān)鏈接,如果存在內(nèi)容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉(zhuǎn)載自:慧都控件網(wǎng)