Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Passing Report Parameter Defaults to Subscription

Author  Topic 

Blowinup
Starting Member

6 Posts

Posted - 2011-06-09 : 16:06:22
Hello,

I searched but could not find this issue in another thread so please forgive me if it has already been addressed elsewhere.

I created a report in Visual Studio that uses default parameters to determine the date range; it selects the day the report is run as the start date and then adds two weeks for the end date.

Here are the default parameters:

StartDate =Today
EndDate =DateAdd("ww",2,(Parameters!StartDate.Value))

I want to create a single subscription that runs every two weeks producing a report with a two week date range.

When I run it in Visual Studio it uses the date range as expected. Now I want to create a subscription that uses the same defaults but I can't seem to figure out how to do it. SSMS will not allow me to select "Use Default"; the field just turns gray when I try to select it. And neither SSMS nor Report Manager will allow my to enter the parameters in the value field.

I'm new to SSRS. Am I missing something? How can I create a subscription that will adhere to my parameters? I'd rather not have to create multiple subscriptions and manually set the dates to run every two weeks.

Please let me know if I've left out any vital information necessary for you to provide assistance.

Thanks in advance for your time,
dave

Blowinup
Starting Member

6 Posts

Posted - 2011-06-09 : 18:12:06
Solved:

I removed the parameter references from my query (@StartDate, @EndDate) but left them in the Report Parameters dialogue and made them Hidden. This removed the parameters fields from the subscription setup but they still apply when the query is run.

NOTE: The reason I left the parameters is because I reference them to add a text label indicating the date range of the report i.e. 6/9/2-11 - 6/23/2011.

Go to Top of Page
   

- Advertisement -