Problem with OLAP

sql server United States
  • 17 years ago

    Hi all,


    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
    1998
    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"


    dsoPartition.Update
    dsoPartition.Process


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


    Cheers


    Rob


    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.

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“An idiot with a computer is a faster, better idiot” - Rich Julius