May 14, 2012 at 8:59 am
I have written a function and i want to use it in my SSRS report. The function retrieves data based on Item and a start and end dates. In SQL I have it working and in SSRS I have it working if I hard code the parameters to the select statement on the report. My dataset works is I do the below.
Select * from Allocations (80830,'01/01/12','01/31/12')
I now what the user to select the item (80830) and the dates. How can I add them in so they are dynamic? I am assuming it is possible.
I am new to functions and a little lost.
Any help is appreciated.
May 14, 2012 at 9:28 am
Can you try to explain more clearly what you are trying to do?
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
May 14, 2012 at 10:21 am
Hi, what you need to do is add the relevant parameters you want the user to enter as report parameters. Then in the data set for report, edit the query, replacing the hard wired values with parameter names in the form of @ParamName (these can be anything but make them meaningful so you know what they are), then also in the data set, go to the parameters tab and map the report parameters you created to the parameter names you have used in the query.
Hope this helps
Dave
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply