1

我正在使用 AMO 以编程方式生成 OLAP Cube。如何为计算成员添加翻译?(SQL Server 2008)

我已经尝试如下,但它不起作用:

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);
4

1 回答 1

1

我在上面的代码中发现了问题,CalculationReference 属性应该设置为“[Measures].[Calculated measureName]”。

于 2011-02-03T17:03:16.873 回答