Search code examples
visual-studiovisual-studio-2012odbcssrs-2008

SSRS parameters basics with ODBC Connection


I have built a report using visual studio 2012, but I cant pass a parameter into it.

I have set up the report parameter called cust, and it gets its values from a dataset.

I have set up a seperate dataset which has a field called cus and i set a query parameter called customer to equal the cust parameter. In the query I have:

where cus = (@customer)

I get an error:

column "customer" does not exist

Can someone confirm where I am going wrong?

Edit: Connection type is an ODBC


Solution

  • So I am completely rewriting this because of the ODBC clarification.

    Change your @Cust to a ?

    Select Cus, FirstName, LastName, otherDataYouMayNeed
    From Table Name
    Where (cus = ?)
    

    Then set the parameter name to ' ? '

    Click on the Parameters Section of the dataset you are working on then make sure you change the parameter name value to a ?

    This should work for your ODBC.

    (Make sure you make your parameter datatype to match the datatype of the "customer")