in SSRS, @Month populates @StartDate and @EndDate, how to hidde @StartDate and @EndDate

Hi, in the report, I have created
1)@Month,
Dataset query:
select  MonthName FROM [MMD_Feed].[dbo].[Calendar]
  where  datepart(yyyy,getdate())=left(EndDate,4)
order by MonthNumber asc

2)@StartDate
Dataset query:
select StartDate  FROM [MMD_Feed].[dbo].[Calendar]
where  MonthName= @MonthName and datepart(yyyy,getdate())=left(EndDate,4)

3)@EndDate
Date query:
select EndDate  FROM [MMD_Feed].[dbo].[Calendar]
where  MonthName= @MonthName and datepart(yyyy,getdate())=left(EndDate,4)

What I want:
in the report, the end user can  see @Month only, so @StartDate and @EndDate will be hidden. When the end user select @Month = March for example, @Month will populate @StartDate = 2015-02-1 and @EndDate = 2015-03-31. In the report, all the tables will show the data from 2015-02-1 to 2015-03-31.

My problem:

I had to make @Month, @StartDate and @EndDate visible in the report parameter setting, so the report can run correctly.
If I configure @StartDate and @EndDate to hidden or internal, the report shows the error message " the 'StartDate'Parameter is missing a value"

So How Can I hide @StartDate and @EndDate to make the report run correctly?

Thank you in advance!
Capture.JPG
tanj1035Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

arnoldCommented:
What is the data in the report, you can use the start and end dates in the where clause, but you are not required to include them in the select
0
tanj1035Author Commented:
Thanks, Arnold. In my report, the dataset of each table contains @startdate and @enddate in where clause already.
I worked it out and want to share with everyone.
In @StartDate and @EndDate parameter setting:
in general : choose hidden
in default value: choose get value from query
"select StartDate  FROM [MMD_Feed].[dbo].[Calendar]
 where  MonthName= @MonthName and datepart(yyyy,getdate())=left(EndDate,4)"

So the @StartDate and @EndDate are hidden but still can pass the value to the tables.

Thanks!!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tanj1035Author Commented:
I figured it out.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
SSRS

From novice to tech pro — start learning today.