Good Day Experts!
I am working on a new assignment that involves SSRS. I am new to SSRS so just trying to make my way though a training manual and online tutorials.
I have been creating queries to provide data for User needs. For the future, the queries needed to take in a parameter. For "proof of concept" data extraction I would just set the parameter to a hard-coded value. Works great and I get desired results to the Management Studio output window.
Now, I have been tasked with using that query and making it into a report. I did not have much trouble with that. However, I am having difficulty with the parameter coding instead of using that hard-coded value. I have added a parameter in the report. It works fine and prompts me for a value but does not do anything at this point.
Next, I need to take that parameter value and pass it to the parameter at the top of my query instead of using that hard-coded value. Unfortunately, I cannot figure out how to do that.
Here is the top of my code. Can I set @calendar to the parameter result that I added to the report?
DECLARE @calendar int;
DECLARE @term varchar(3);
DECLARE @termArray varchar(25);
DECLARE @startDate as date;
DECLARE @endDate as date;
SET @calendar = '16';
SET @termArray = 'Q1,Q2,Q3,Q4';