I have a stored procedure that accepts two float parameter values used to filter results. I want to allow the end user to enter the values in either order in case they make a mistake. For example, if they want all the rows that have a score value between 40.0 and 60.0 I want to allow them to select 60.0 as the minimum value and 40.0 as the maximum value (a mistake) and still get the proper results. I check the two parameters and swap them if they're in the wrong order within the stored procedure. This works great if I execute the stored procedure. If I select the wrong-ordered values in the report I don't get any rows back, the same as would happen before I added the code to swap the values.Is there anything I need to do to allow SSRS to work with this? I did run the stored procedure within the Query Designer and it worked fine.Not sure if you need to see this for this problem but here's a snippet. Please let me know if I should provide any other info.[code="other"]ALTER PROCEDURE [dbo].[TestAScoreRange] @MinimumCompositeScore float, @MaximumCompositeScore float ASbegin SET NOCOUNT ONdeclare @Swapem floatif @MinimumCompositeScore > @MaximumCompositeScore select @swapem = @MaximumCompositeScore , @MaximumCompositeScore = @MinimumCompositeScore, @MinimumCompositeScore = @Swapemselect * from ... [/code]Thanks for reading.
↧