Lorrie
Lorrie

Reputation: 1

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

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.

Upvotes: 0

Views: 196

Answers (1)

Chris Latta
Chris Latta

Reputation: 20560

You don't use an expression in the query parameter; rather you use the parameter in your query expression. In this instance you would create a date parameter called lock_date. This will show a text box and date picker in your parameters that allows you to enter a date. You don't enter an expression here, just a date to use in other expressions.

Then you filter your data on this parameter, for example in your SQL for your dataset:

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

You could also create a filter expression in your table properties that uses the parameter.

Upvotes: 2

Related Questions