我想在 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]
查询执行但没有结果,并且参数不起作用。