none
SSRS sql query executes, but cannot preview report

    Question

  • Hello

    I searched and could not find a specific post about this.  I am new to SQL and SSRS, so please bear with me.

    I created a report in VS2005 using the report wizard.  The query is of a SQL database and is vey basic.  I have 12 columns, and one parameter.  The parameter is @ST_SHIP_DT, and is linked to a field in my SQL database table called SHIP_DTS.  The default value is set to Now().

    The query executes fine, it prompts me and then delivers the proper amount of rows, and does so quickly.  The layout tab shows that the parameter seems to be setup correctly.  However, when I preview the report, or deploy it, I get this:


  • The Value expression for the query parameter ‘@ST_SHIP_DT’ contains an error: The expression referenced a non-existing parameter in the report parameters collection. (rsRuntimeErrorInExpression)

    I have no idea, I dont get how this works fine in the Data tab, but doesnt workin the preview or deployment.  Anyone?
Tuesday, January 26, 2010 10:04 PM

Answers

  • Hi tamtam,

    Check your dataset properties -> Parameters. It should show you your query parameter and then it should show =Paramters!<name>.Value as Value expression. When you execute your query in the Data view, it uses the default values for the parameters specified in the Query Parameters window. However, when you preview or deploy the report, the query parameters get matched to the expressions set for them in the dataset properties.
    Boyan Penev --- http://www.bp-msbi.com
    Wednesday, January 27, 2010 3:15 AM

All replies

  • Hi tamtam,

    Check your dataset properties -> Parameters. It should show you your query parameter and then it should show =Paramters!<name>.Value as Value expression. When you execute your query in the Data view, it uses the default values for the parameters specified in the Query Parameters window. However, when you preview or deploy the report, the query parameters get matched to the expressions set for them in the dataset properties.
    Boyan Penev --- http://www.bp-msbi.com
    Wednesday, January 27, 2010 3:15 AM
  • Thanks!  That was the problem.  Appreciate your help!

    Tammy
    Thursday, January 28, 2010 1:14 PM