1

好吧,我member monthname as ()每个月都有一个“”

这是我查询的一部分

member Diciembre as
(
([Dim Tiempos].[Año-Mes].[Año].&[@anioact].&[12],([Measures].[venta]),[Dimregion].[Puntovta].&[@cedis],[Dimproductos].[Categoria].&[Agua 20 Lt])
-([Dim Tiempos].[Año-Mes].[Año].&[@anioant].&[12],([Measures].[venta]),[Dimregion].[Puntovta].&[@cedis],[Dimproductos].[Categoria].&[Agua 20 Lt])


)

select {Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre} on columns,
FILTER(
{[Dimrutas].[Ruta].Members},
(([Measures].[Venta]),[Dimregion].[Puntovta].&[@cedis],[Dimproductos].[Categoria].&[Agua 20 Lt]) > 0
)ON ROWS

from CuboBebidas
where ([Dimproductos].[Categoria].&[Agua 20 Lt],[Dimregion].[Puntovta].&[@cedis])

如果我不使用参数它工作正常!现在我需要将它传递给报告服务,我需要参数

你可以看到我有@nameparameter,我需要这些参数,但它不能仅仅作为它工作。

@anioact= user will one year
@anioant= @anioact-1
@cedis=a intenger number

那我该怎么做呢?

4

1 回答 1

1

SSRS 的 MDX 查询中的参数可能是 [whatever] 中的一个痛苦。我的建议是用这些参数构建一个字符串。查询应如下所示:

="member ... [Dimregion].[Puntovta].&[" & Parameters!cedis.Value & "] ..."

希望这有帮助!

于 2012-04-17T18:36:05.700 回答