2
votes

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

My report has a radio button, asking for the sort order asc or desc. I was thinking of sorting it from the procedure side. My report does not have any grouping. Can I sort the table using this value on the SSRS side itself?

1

1 Answers

0
votes

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")