0

I am very new to using Report Builder and am trying to use an expression to pull lock dates greater than 12/31/2012.

The error:

The Value expression for the query parameter ‘@lock_date’ contains an error: [BC30201] Expression expected.

The query parameter:

=Fields!lock_date.Value>"12/31/2012 00:00:00"

Please help - something so simple as using a greater than expression shouldn't be so difficult.

4

1 回答 1

2

您不要在查询参数中使用表达式;而是在查询表达式中使用参数。在这种情况下,您将创建一个名为 的日期参数lock_date。这将在您的参数中显示一个文本框和日期选择器,允许您输入日期。您无需在此处输入表达式,只需在其他表达式中输入日期即可。

然后根据此参数过滤数据,例如在数据集的 SQL 中:

SELECT lock_date, somefield, anotherfield
FROM MyTable
WHERE lock_date > @lock_date

您还可以在使用该参数的表属性中创建过滤器表达式。

于 2013-06-11T07:41:41.040 回答