dbTalk Databases Forums  

Handling the order of drillthrough columns

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Handling the order of drillthrough columns in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ohjoo Kwon
 
Posts: n/a

Default Handling the order of drillthrough columns - 02-18-2005 , 12:14 PM






I tested if I can handle the order of drillthrough columns through DSO
programming. Following is my sample.

----------------------------------------------------------------------------
---
Private Sub DrillThroughTest()
Dim dsoSvr As DSO.Server

Dim dsoDB As DSO.MDStore
Dim dsoCube As DSO.MDStore
Dim dsoPart As DSO.MDStore

Dim strDrillThroughColumns As String
Dim strDrillThroughFilter As String
Dim strDrillThroughFrom As String
Dim strDrillThroughJoins As String

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' Connect to server
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set dsoSvr = New DSO.Server
dsoSvr.Connect "localhost"

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' set db, cube and partition
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Set dsoDB = dsoSvr.MDStores("Foodmart 2000")
Set dsoCube = dsoDB.MDStores("Sales")
Set dsoPart = dsoCube.MDStores("Sales")

strDrillThroughColumns = """store"".""store_id"",
""store"".""store_type"""
strDrillThroughFilter = ""
strDrillThroughFrom = """sales_fact_1997"", ""store"""
strDrillThroughJoins =
"(""sales_fact_1997"".""store_id""=""store"".""sto re_id"")"

'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' set drillthrough
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
With dsoPart
.DrillThroughColumns = DrillThroughColumns
.DrillThroughFilter = DrillThroughFilter
.DrillThroughFrom = DrillThroughFrom
.DrillThroughJoins = DrillThroughJoins
.Update
End With

Set dsoPart = Nothing
Set dsoCube = Nothing
Set dsoDB = Nothing

dsoSvr.CloseServer
Set dsodvr = Nothing
End Sub
----------------------------------------------------------------------------
---

I tested two cases respectively.

First, strDrillThroughColumns = """store"".""store_id"",
""store"".""store_type"""
Second, strDrillThroughColumns = """store"".""store_type"",
""store"".""store_id"""

But when I execute drillthrough, the order of columns of result set is
always store_id, store_type.

Of course, I can refer to the fields of result set in the order that I want.
But it's not what I want. I heared that the order can be handled through DSO
programming.

What is wrong in my example?


Ohjoo Kwon
www.olapforum.com



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.