Using Parameters in MS Reporting Services (SQL Server 2008) against an ODBC data source

Question :

Using Parameters in MS Reporting Services (SQL Server 2008) against an ODBC data source,

Answer :

I writing a report in Visual Studio that takes a user input parameter and runs against an ODBC datasource. I would like to write the query manually and have reporting services replace part of the where clause with the parameter value before sending it to the database. What seems to be happening is that the @parmName I am assuming will be replaced is actually being sent as part of the SQL statement. Am I missing a configuration setting somewhere or is this simply not possible?

Read More  How do you feel about code folding?

I am not using the filter option in the tool because this appears to bring back the full dataset from the database and do the filtering on the SQL Server.

,

It sounds like you’ll need to treat the SQL Statement as an expression. For example:

="Select col1, col2 from table 1 Where col3 = " & Parameters!Param1.Value   

If the where clause is a string you would need to do the following:

="Select col1, col2 from table 1 Where col3 = '" & Parameters!Param1.Value & "'"  

Important: Do not use line breaks in your SQL expression. If you do you will get an error.

Read More  Reasons not to build your own bug tracking system

Holla back if you need any more assistance.

That’s the answer Using Parameters in MS Reporting Services (SQL Server 2008) against an ODBC data source, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you

Read More  Where are people getting that rotating loading image?