开发者

Add translations to calculated member through AMO

I am using AMO to programmatically generate an OLAP Cube. How can I add translations for the calculated members? (SQL Server 2008)

I have tried as follows, but it does not work:

开发者_JS百科MdxScript mdx = cube.MdxScripts[0];
CalculationProperty calculation = new CalculationProperty();
calculation.CalculationReference = "[Calculated measureName]";
calculation.CalculationType = CalculationType.Member;
Translation translation = new Translation();
translation.Caption = "Some Caption";
translation.Language = "Language Code";
calculation.Translations.Add(translation);
mdx.CalculationProperties.Add(calculation);


I have found the problem in the code above, the CalculationReference property should be set to "[Measures].[Calculated measureName]".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜