dbTalk Databases Forums  

Analysis Services: Error in Slicevalue

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


Discuss Analysis Services: Error in Slicevalue in the microsoft.public.sqlserver.olap forum.



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

Default Analysis Services: Error in Slicevalue - 11-22-2004 , 08:31 AM






I am getting an error when processing a partition through DSO. I would
really appreciate your help.

Description of the error:

When adding a slicevalue to a partition through DSO and processing, I
am getting some sort of non-displayable characters between the levels.
Instead of being [All].[Year].[Quarter].[Month], each level appears
on a separate line with a non displayable character after each one
(maybe a newline?).

This is the error message:
Processing error [Object does not exist] '
[All]
[2003]
[Quarter 2]
[May]'

Part of my code:

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

dsoPartition = Type(m_dsoCube.MDStores.AddNew(CUBENAME), DSO.MDStore)

dsoPartition.SourceTable = m_dsoCube.SourceTable

dsoPartition.SourceTableFilter = m_dsoCube.SourceTableFilter & " AND "
& m_objData.DMSchema & "." & m_objData.FactTable & "." &
m_objData.PartitionKeyColumn & " = " &
rdPartition.GetValue(0).ToString

dsoPartition.Update()

For Each dsoDim In dsoPartition.Dimensions

If dsoDim.Name = "Time.Calendar" Then

For Each dsoLevel In dsoDim.Levels
If dsoLevel.Name = "Month" Then
dsoLevel.SliceValue = "Sep 2002"
End If
if dsoLevel.Name = "Year" Then
dsoLevel.SliceValue = "2002"
End If
If dsoLevel.Name = "Quarter" Then
dsoLevel.SliceValue = "3Q2002"
End If
if dsoLevel.Name = "All" Then
dsoLevel.SliceValue = "All Time"
End If
Next

Next

dsoPartition.Update()


Thanks in advance,
Mart

Reply With Quote
  #2  
Old   
Dave Wickert [MSFT]
 
Posts: n/a

Default Re: Analysis Services: Error in Slicevalue - 11-22-2004 , 12:21 PM






A trick:
Get a copy of the Metadata Scripter from the SQL Server 2000 Resource Kit
(at your favorate bookstore, an on-line vendor, such as www.bn.com, or
locate someone with a TechNet distribution in your company, it is on the
Resource Kit CD/DVD).
1) use the metadata scripter to generate a vb program based on your
database.
2) create the partition you want by-hand using Analysis Manager
3) use the metadata scripter to generate a second vb program based on the
new database.
4) use windiff to look at the differences between #1 and #3
My guess is that there is somekind of encoding or additional property that
you are missing.
Hope that helps.
--
Dave Wickert [MSFT]
dwickert (AT) online (DOT) microsoft.com
Program Manager
BI SystemsTeam
SQL BI Product Unit (Analysis Services)
--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Mart" <canapolis (AT) gmail (DOT) com> wrote

Quote:
I am getting an error when processing a partition through DSO. I would
really appreciate your help.

Description of the error:

When adding a slicevalue to a partition through DSO and processing, I
am getting some sort of non-displayable characters between the levels.
Instead of being [All].[Year].[Quarter].[Month], each level appears
on a separate line with a non displayable character after each one
(maybe a newline?).

This is the error message:
Processing error [Object does not exist] '
[All]
[2003]
[Quarter 2]
[May]'

Part of my code:

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

dsoPartition = Type(m_dsoCube.MDStores.AddNew(CUBENAME), DSO.MDStore)

dsoPartition.SourceTable = m_dsoCube.SourceTable

dsoPartition.SourceTableFilter = m_dsoCube.SourceTableFilter & " AND "
& m_objData.DMSchema & "." & m_objData.FactTable & "." &
m_objData.PartitionKeyColumn & " = " &
rdPartition.GetValue(0).ToString

dsoPartition.Update()

For Each dsoDim In dsoPartition.Dimensions

If dsoDim.Name = "Time.Calendar" Then

For Each dsoLevel In dsoDim.Levels
If dsoLevel.Name = "Month" Then
dsoLevel.SliceValue = "Sep 2002"
End If
if dsoLevel.Name = "Year" Then
dsoLevel.SliceValue = "2002"
End If
If dsoLevel.Name = "Quarter" Then
dsoLevel.SliceValue = "3Q2002"
End If
if dsoLevel.Name = "All" Then
dsoLevel.SliceValue = "All Time"
End If
Next

Next

dsoPartition.Update()


Thanks in advance,
Mart



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.