Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Query Paramater data type conversion

Author  Topic 

gbritton
Master Smack Fu Yak Hacker

2780 Posts

Posted - 2013-11-27 : 09:37:14
I've become interested in just how SSRS processes parameters passed to queries. In particular, what it does with the datatype Boolean.

Say I have a parameter, @prmBool, defined as type boolean with a default value of True. Then, I create a query like this:

Select case @qryBool
when 1 then 'yup'
when 0 then 'nope'
else 'huh?'
end as result


now, I put that query into a dataset called TestBoolean and map the report parameter @prmBool to the query parameter @qryBool. Then I set up another report parameter so I can see the result. @Result is defined as text with the default value set to get it from a query -- the very query defined above.

Running this, it appears to "do the right thing". That is I get 'yup' back when @prmBool = True and 'nope' back when @proBool = False. I never get 'huh?' back.

What I'd like to see is some documentation that actually details the mapping/conversion that BIDS does when building up the SQL command and substituting the report parameters to the query parameters.

Can anyone point me to a reference?
   

- Advertisement -