Hi all,

Wasn't sure where to post this since it encompasses more than just SQL Server.

Anyway, I'm trying to set the SliceValue for the time dimension of a partition. The problem I have is that a Carriage Return is being added to each level so when I try to process the Partition I get the following error: -

Processing error [Object does not exist] 'All Year
Quarter 2'

My code is shown below: -

Dim dsoServer As New DSO.Server
Dim dsoDB As DSO.MDStore
Dim dsoCube As DSO.MDStore

Dim dsoPartition As DSO.MDStore
Dim dsoDimension As DSO.Dimension
Dim dsoLevel As DSO.Level

dsoServer.Connect "MyServer"
Set dsoDB = dsoServer.MDStores("Tutorial")

Set dsoCube = dsoDB.MDStores("Sales")
Set dsoPartition = dsoCube.MDStores("Sales 98")

Set dsoDimension = dsoPartition.Dimensions("Time")

Set dsoLevel = dsoDimension.Levels("(All)")
dsoLevel.SliceValue = "All Time"

Set dsoLevel = dsoDimension.Levels("Year")
dsoLevel.SliceValue = "1998"

Set dsoLevel = dsoDimension.Levels("Quarter")
dsoLevel.SliceValue = "Quarter 2"


Does anyone know how I can prevent this carriage return being appended to each level?



PS. I've already tried setting the SliceValue and then removing the last character. It would seem that the CR's only get added when the "Process" is executed.