Hello,
When I run the following code, I get an empty schema.
Dim drAction As DataRow
Dim dsActions As DataSet
dsActions = MyConnection.GetSchemaDataSet(AdomdSchemaGuid.Actions, _
New Object() {szDatabase, Nothing, szCubeName, Nothing, Nothing, szCubeName, 1})
The result:
dsActions.Tables.Count = 1 but dsActions.Tables(0).Rows.Count = 0
Even though my cube contains two actions as it is shown in the following:
<Actions>
<Action xsi:type="DrillThroughAction">
<ID>Drillthrough Action</ID>
<Name>Drillthrough Action</Name>
<TargetType>Cells</TargetType>
<Target>MeasureGroupMeasures("Values Measure")</Target>
<Type>DrillThrough</Type>
<Default>true</Default>
<MaximumRows>3</MaximumRows>
</Action>
<Action xsi:type="DrillThroughAction">
<ID>Drillthrough Action 1</ID>
<Name>Drillthrough Action 1</Name>
<TargetType>Cells</TargetType>
<Target>MeasureGroupMeasures("Values Measure")</Target>
<Type>DrillThrough</Type>
<Default>true</Default>
<MaximumRows>2</MaximumRows>
</Action>
</Actions>
Thanks,
yones
hello Yones,
i think the problem is with the restrictions you specify. I think coordinate and coordinate type in this case should be: Coordinate type should be Cell (6) and Coordinate should be a tuple defining your cell. (right now it looks like they are for cube object). So for example the query could look like (for Adventure Works)
dsActions = MyConnection.GetSchemaDataSet(AdomdSchemaGuid.Actions, _
New Object() {
"Adventure Works DW", // CATALOG_NAME
Nothing, // SCHEMA_NAME
"Adventure Works", // CUBE_NAME
Nothing, // ACTION_NAME
Nothing, // ACTION_TYPE
"([Customer].[Customer Geography].[Country].&[Canada],[Measures].[Internet Extended Amount])", // COORDINATE
6}) // COORDINATE_TYPE : MDACTION_COORDINATE_CELL (6)
hope this helps,
|||Hello Mary,
First thank you very much for your help.
I tried Cell actions instead of Cube actions as it is shown in the following code:
dsActions = MyConnection.GetSchemaDataSet(AdomdSchemaGuid.Actions, _
New Object() {"AmoAdventureWorks", Nothing, "Adventure Works", Nothing, Nothing, "[Date].[Calendar Month Name].[All Periods],[Customer].[City].[All Customers],[Measures].[Reseller Sales Amount]", 6})
But the result was the same:
dsActions.Tables.Count = 1
dsActions.Tables(0).Rows.Count = 0
And my cube contains the following action:
<Actions>
<Action xsi:type="DrillThroughAction">
<ID>Drillthrough Action 1</ID>
<Name>Drillthrough Action</Name>
<TargetType>Cells</TargetType>
<Target>MeasureGroupMeasures("Reseller Sales")</Target>
<Type>DrillThrough</Type>
<Default>true</Default>
<MaximumRows>4</MaximumRows>
</Action>
</Actions>
Please let me know if you notice any wrong in my code.
Again thank you
Yones|||hello Yones,
i think you might be missing () inside a coordinate. I.e. i think it should be "([Date].[Calendar Month Name].[All Periods],[Customer].[City].[All Customers],[Measures].[Reseller Sales Amount])".
hope this helps,
No comments:
Post a Comment