原創(chuàng)|其它|編輯:郝浩|2012-10-17 17:19:15.000|閱讀 751 次
概述: 針對如何用 ADOMD.NET Data Provide綁定 PivotGridControl 到OLAP多維數(shù)據(jù)集,我們給出一個具體代碼事例供大家參考:
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
針對如何用 ADOMD.NET Data Provide綁定 PivotGridControl 到OLAP多維數(shù)據(jù)集,我們給出一個具體代碼事例供大家參考:
代碼如下:
C#
using System; using System.Windows.Forms; using DevExpress.XtraPivotGrid; namespace XtraPivotGrid_ADOMD { public partial class Form1 : Form { public Form1() { InitializeComponent(); } void Form1_Load(object sender, EventArgs e) { // Specifies that PivotGridControl should use the ADOMD.NET data provider // to bind to an OLAP cube. pivotGridControl1.OLAPDataProvider = OLAPDataProvider.Adomd; // 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_ADOMD 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 ADOMD.NET data provider ' to bind to an OLAP cube. pivotGridControl1.OLAPDataProvider = OLAPDataProvider.Adomd ' 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)