使用查找的ssrs参数

时间:2015-04-01 14:24:58

标签: reporting-services parameters lookup

我正在尝试检索数据集的同一行的多个值。 我有一个第一个参数,使用名为“getCycleVie”的数据集 从那里我检索数据集的行标识符。 我必须检索该行的另外两个值,以用于另一个数据集中的参数,dtdebutdtfin 这适用于文本框

=Lookup( Trim(Parameters!CycleVie.Value) ,Trim(Fields!cyclevie.Value) ,Fields!dtdebut.Value ,"getCycleVie" )

然而,当我将其添加为参数的默认值或者如果我将其添加为数据集中的参数时,我会收到以下错误 Une expression de la propriété Value utilisée pour le paramètre de rapport de l'objet 'dtdebut' fait référence à un champ. Les champs ne peuvent pas être utilisés dans les expressions de paramètre de rapport. 大致翻译为an expression of the property value used for the report parameter object 'dtdebut' is referencing a field. a field cannot be used in the parameter expressions of the report

我不一定需要查找,我只需要检索数据集同一行的多个值。

1 个答案:

答案 0 :(得分:2)

我不认为查找是问题,但您想在参数中使用它。您可能需要创建一个新数据集并将其基于第一个参数。

您的新数据集如下所示:

SELECT dtdebut 
FROM YOURTABLE
WHERE cyclevie = @CycleVie

然后将数据集结果用于其他参数。

以下是有关级联参数的更多信息 - https://technet.microsoft.com/en-us/library/aa337498(v=sql.105).aspx