views:

1002

answers:

1

Hi,

Could you please tell me if there is a way to pass the parameter of boolean type from reporting services to PL/SQL. I tried using data type boolean in PL/SQL that is not allowing me to create the dataset.

my report is having a radio button , asking for the sort order asc or desc. i was thinking of sorting it from the procedure side. My report is not having any grouping. can i sort the table using this value in SSRS side itself.

please give me an idea

Thanks, Jaz

A: 

One thing you might try if you want to use the parameter value in your SQL statement is have a parameter that you can use to alter the SQL statement. For example, have a string parameter called SortOrder which allows the items (Non-query):

Value    Label
--------------------
ASC      Ascending
DESC     Descending

Then you can use this to alter your SQL statement. Your SQL statement can be passed as a string so you data source may look something like this:

="SELECT * "
&"FROM MyTable "
&"ORDER BY SomeField " & Parameters!SortOrder.Value

If you really want to use a radio button, then you could do something like this:

="SELECT * "
&"FROM MyTable "
&"ORDER BY SomeField " & IF(Parameters!SortOrder.Value, "ASC", "DESC")
Chris Latta
how do you execute this statement? it is not creating me the dataset, fileds are not shown
If you set the SQL string manually like this you need to either set the fields up manually (in the fields list, right-click and chose Add) or run the SQL once normally to have the fields set up for you, then turn it into a string like above to include your parameters in the SQL
Chris Latta
thanks, that helps, but my report should be able to pass the boolean type parameter value to the PL/SQL stored procedure. its not doing that any way (giving boolen type in pl/sql). is that is possible by any chance