Pentaho Report Designer的MDX参数

时间:2017-03-15 21:32:06

标签: parameter-passing mdx pentaho pentaho-report-designer

我想在Pentaho报表设计器中向主报表MDX查询添加一个参数,但我是MDX的新手。我已经尝试将参数添加到语句末尾的where子句但是没有太多运气。该参数在报表设计器中创建,名称为 p_bod_is 。需要设置的成员是[GL Account.GL Account BOD Inc Stmt],它是参数的值。我原来的MDX查询如下:

WITH
SET [*NATIVE_CJ_SET_WITH_SLICER] AS '[*BASE_MEMBERS__GL Account.GL Account BOD Inc Stmt_]'
SET [*NATIVE_CJ_SET] AS '[*NATIVE_CJ_SET_WITH_SLICER]'
SET [*BASE_MEMBERS__Measures_] AS '{[Measures].[*ZERO]}'
SET [*CJ_ROW_AXIS] AS 'GENERATE([*NATIVE_CJ_SET], {([GL Account.GL Account BOD Inc Stmt].CURRENTMEMBER)})'
SET [*BASE_MEMBERS__GL Account.GL Account BOD Inc Stmt_] AS '[GL Account.GL Account BOD Inc Stmt].[GL Account BOD Inc Stmt].MEMBERS'
SET [*SORTED_ROW_AXIS] AS 'ORDER([*CJ_ROW_AXIS],[GL Account.GL Account BOD Inc Stmt].CURRENTMEMBER.ORDERKEY,BASC)'
SELECT
[*BASE_MEMBERS__Measures_] ON COLUMNS
,[*SORTED_ROW_AXIS] ON ROWS
FROM [GL]

我的尝试在这里:

WITH
SET [*NATIVE_CJ_SET_WITH_SLICER] AS '[*BASE_MEMBERS__GL Account.GL Account BOD Inc Stmt_]'
SET [*NATIVE_CJ_SET] AS '[*NATIVE_CJ_SET_WITH_SLICER]'
SET [*BASE_MEMBERS__Measures_] AS '{[Measures].[*ZERO]}'
SET [*CJ_ROW_AXIS] AS 'GENERATE([*NATIVE_CJ_SET], {([GL Account.GL Account BOD Inc Stmt].CURRENTMEMBER)})'
SET [*BASE_MEMBERS__GL Account.GL Account BOD Inc Stmt_] AS '{[GL Account.GL Account BOD Inc Stmt].[${p_bod_is}]}'
SET [*SORTED_ROW_AXIS] AS 'ORDER([*CJ_ROW_AXIS],[GL Account.GL Account BOD Inc Stmt].CURRENTMEMBER.ORDERKEY,BASC)'
SELECT
[*BASE_MEMBERS__Measures_] ON COLUMNS
,[*SORTED_ROW_AXIS] ON ROWS
FROM [GL]

查询执行但没有结果,参数无效。

0 个答案:

没有答案