Showing posts with label specified. Show all posts
Showing posts with label specified. Show all posts

Monday, March 26, 2012

Member.FetchAllProperties Error

I get

"System.NotSupportedException: The method specified is not supported by the

current provider."

AdomdClient v8, VS 2003, SQL Server 2000

What's the cause of this and is there any way around it?

hello,

it looks like the error might be caused by an older version of msolap80 provider. I'd suggest to check on it, and if indeed - update.

hope this helps,

|||Hi Mary, I have msolap80 version 8.00.760. I can't find anything more recent than that.|||

hello Kevin,

i think 760 is not the latest one... did you install sp4?

i think you can try the PTS from here: http://www.microsoft.com/downloads/details.aspx?familyid=DF0BA5AA-B4BD-4705-AA0A-B477BA72A9CB&displaylang=en
(search for "Microsoft SQL Server 2000 PivotTable Services" section)

or here is the link to sql server sp4: http://www.microsoft.com/downloads/details.aspx?familyid=8E2DFC8D-C20E-4446-99A9-B7F0213F8BC5&displaylang=en

hope this helps,

|||Hi Mary,

Thanks. I applied SP4 and that did the trick. However, what I now find is that after calling FetchAllProperties I still get no member properties. Is there something that needs to be called or configured even earlier? Here's a code snippet.

For Each position As AdomdClient.Position In positions

Dim member As AdomdClient.Member = position.Members(0)

member.FetchAllProperties()

Dim properties As MemberPropertyCollection = member.MemberProperties

Debug.WriteLine(String.Format("No. of member properties = {0}", properties.Count))

For Each p As AdomdClient.MemberProperty In properties
Debug.WriteLine(String.Format("Property = {0}, {1}", p.Name, p.Value))
Next

Next|||

hello Kevin,

member.FetchAllProperties() call populates the member.Properties collection. and the member.MemberProperties collection should contain the properties explicitly requested in the mdx query (in “DIMENSION PROPERTIES” clause).

depending on whether you need those properties for all/many members or not, you can either request them in the query (and access them with .MemberProperties collection), or request properties for a specific(few) members afterwards by calling .FetchAllProperties() and accessing properties from the .Properties collection.

hope this helps,

|||Hi Mary. Thanks for this. It worked. We used the second technique because we need to be generic, i.e., we don't know in advance what user-defined properties will be available. But here's another question. Calling Member.Properties gives e.g.,

Property Name: MEMBER_KEY, Property Value: 13
Property Name: IS_PLACEHOLDERMEMBER, Property Value: False
Property Name: IS_DATAMEMBER, Property Value: False
...
Property Name: Allow Input, Property Value: 0

The last one here is one of our user-defined properties. The previous ones are the intrinsic properties. Is there a way of telling the difference? At the moment I've noticed that the intrinsic names are all upper case, while our UDPs are mixed case. As a first stab I'm just testing for all upper case and excluding. But of course this is not the most rigorous of methods!

Monday, March 12, 2012

MDX year,month function

Is there a equivalent function from mdx to convert date to year or month like datepart from sql? ytd for example seems only working on a specified date member. But I want something like :

WITH

MEMBER [Measures].[ParameterCaption] AS '[aaaa].[bbbb].CURRENTMEMBER.MEMBER_CAPTION'

MEMBER [Measures].[ParameterValue] AS '[aaaa].[bbbb].CURRENTMEMBER.UNIQUENAME'

MEMBER [Measures].[ParameterLevel] AS '[aaaa].[bbbb].CURRENTMEMBER.LEVEL.ORDINAL'

SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS ,

[aaaa].[bbbb].AllMembers ON ROWS

FROM [XXXX]

...

but return all available years with the dates in the cube.

Thanks.

Regards

Alu

What I did was to amend my datasource view on which my cube is based, for date with a month and year field.

Then I did not need to worry about this in the MDX.|||MDX supports VBA function VBA!DatePart, but it performs worse then other MDX functions.|||

Hi thanks for the reply. However I have a data source view time dimension table and the mdx query which i have provided does not come from it. rather it comes from just a field with normal dates.

Thanks.

Regards

Alu

Friday, March 9, 2012

MDX Question

Can I do an MDX query with a start/stop filter specified as dates, but aggregate results by month? For example, could I query data between Jan 15, 2005 and April 14, 2005 and get results aggregated by month? I would expect four resulting rows or cells:

January (only contains data from the fifteenth to the thirty first)
February (data for entire month)
March (data for entire month)
April (only contains data from the first to the fourteenth)

I know how to filter by month and aggregate by month:

SELECT [Date].[Month].[2005-01]:[Date].[Month].[2005-04] ON Columns FROM [My Cube];

I also know how to filter by day and aggregate by day:

SELECT [Date].[Day].[2005-01-15]:[Date].[Day].[2005-04-14] ON Columns FROM [My Cube];

But I don't know how to filter by day and aggregate by month. Is this at all possible using MDX?

SELECT Date.Month.Month.MEMBERS ON 0 FROM

(SELECT [Date].[Day].[2005-01-15]:[Date].[Day].[2005-04-14] ON Columns FROM [My Cube])

|||

Mosha Pasumansky wrote:

SELECT Date.Month.Month.MEMBERS ON 0 FROM

(SELECT [Date].[Day].[2005-01-15]:[Date].[Day].[2005-04-14] ON Columns FROM [My Cube])

Brilliant! That worked. Thanks!