Groups | Blog | Home
all groups > sql server reporting services > june 2007 >

sql server reporting services : Default parameter


RoyA
6/14/2007 9:17:02 AM
Hi All,
I have a couple of reports that have date params. I would like to schedule
the reports to be emailed but, I cannot determine how the parameters should
be setup.
The date parameters would be as follows
From Date today's date -1
To Date Today's date.
I have tried =dateadd(dd, -1, now) also =dateass(dd, -1, getdate()) and
neither work.
Your help is appreciated.

EMartinez
6/15/2007 12:35:18 AM
[quoted text, click to view]


If I'm understanding you correctly, you should be able to use this:
=Dateadd("d", -1, Now())
Hope this helps.

Regards,

Enrique Martinez
Sr. Software Consultant
RoyA
6/15/2007 7:22:00 AM
My original post was not totally clear. The report works fine when I navigate
to the page and enter the parameters, in this case dates. I would like to
schedule this report for delivery. The problem is no matter what I enter in
the default param boxes I get the error. I cannot find any example of how to
accomplish this anywhere.
When I enter the code you suggested and click Apply I get the error again.
Thanks,
Roy

[quoted text, click to view]
Aussie Matt
6/17/2007 2:08:01 AM
Roy,
Hello mate, I had to do a similar thing, and I created a dataset that would
select the default values I needed for the report, then in the report
paramters section for the default value you make it referance that new
dataset, then when you create your subscription you leave the values as the
default, an everytime it runs it updates the defaults and your away...

Cheers

Matt

[quoted text, click to view]
AddThis Social Bookmark Button