Need to set a date parameter on an SSRS subscription - reporting-services

I have a report in SSRS that takes a single date as a parameter. What I want is for that report to have a subscription that uses the Saturday of two weeks ahead as the date (i.e., Monday 7/4 would give Saturday 7/16). How can I do this in the subscription? Looks like I can't do a formula in the parameter.

You have to set the default parameter value in the report, not in the subscription. An expression to use in the default for the date parameter would look something like this. There both add 2 weeks to the current date.
=DataAdd(DateInterval.WeekOfYear, 2, Today)
or
=Today.AddDays(14)
The default values can be set using the Report Parameters Properties dialog in the report designer. Just double-click on the parameter you want to change and the dialog will open.

Related

set default value for date time parameter in rdlc

i have a report which has extension of rdl (Microsoft Reporting Services Projects) in visual studio 2017 and this report has a date time parameter
i want to set a default value for this parameter as current date in order not to force a user to choose a value for this parameter
so when i right click the parameter i choose Default Values then Specify Values
then i add the Value =Now()
with no benefit when i preview the report the date time parameter becomes disabled
how to enter a default value as current date without time value
Your only question seems to be:
How to enter a default value as current date without time value?
To do this, rather than using =now() which returns the current date and time, you can use =today() which returns just today's date.

Pass same SSRS parameter value to next reports to maintain the path

I have a multivalued filter as a parameter on my reports. The values are the months of the years. The default value is the current month. The vaser can she the reports for each month by selection a month value from the filter.
There is also a text box in the report that shows the month value that which month has been selected as
[#Month.Label]
The problem is that now i need to maintain the navigation. From the main report there are links to the next reports. But when I click on the link to go to the other report the report shows the current month's report.
Is it possible that if i click on the link in the report the selected month value could passed to the next report instead of the current month value?
Graphical Description of the problem
If your have control over the client application then you probably want to expose the default value as a nullable parameter #ReportDate. This way you can pass in the optional value. The default will be used when no value is passed in. However, this will only work if the date filter applied outside of the report, otherwise, you will have to link to child reports as sub-reports to keep the value persistent between transitions.

What is the correct format for SSRS datetime parameter on Subscription page

I have a report which takes two dates as parameters. This is meant to be automated report, send regularly via subscription to certain users. Let's say I want dateTo to be today and date from to be today - days.. I can't figure out the format or formula that would do this in these fields... I am getting :
One or more report parameters have an invalid parameter value.
Thanks for any help!
Make another parameter like #ReportPeriod, that accepts either "Daily", "Weekly" or "Monthly", and the subscription sets the value of that. Then hide the Date parameters and set them inside the report based on the ReportPeriod chosen.

Report Builder 3.0 Updating Parameter Panel

I have a report that has StartDt, and EndDt as parameters. When a user leaves these blank, I default StartDt to yesterday, and EndDt to today. That works fine the the actual parameter send to SQL. But is there a way to update the SSRS Parameter Panel to show the user what dates were defaulted?
I know I could just make the parms required, but I'd rather default the dates like this so users can just put in there account(s) and move on.
Set the default value expressions for each date parameter using the standard date/time functions.
You can set today as:
=Today()
Yesterday as:
=DateAdd(DateInterval.Day, -1, Today())
See How to: Add, Change, or Delete Default Values for a Report Parameter for more details.
Edit after comments
Say you have the following parameters:
StartDt and EndDt are just set up as Date/Time:
Set the Default Values expression for each parameter using the expressions above, i.e. =Today() and =DateAdd(DateInterval.Day, -1, Today()):
Now, when you load the report for the first time the two parameters are already populated with the Default Values:
Users can then just leave the dates as the defaults as they're already set, or change them as necessary.

sql query to get a scheduled report to run for that curent month only

I have an SSRS 2005 report that has a dataset for to an Oracle database. The report that i have essentially just pulls all data back from an audit log. This report works perfectly fine and i have scheduled thi to run and send an email using the new subscription method within SSRS.
The only issue i have is i want the report to run on the last day of the month (its set up to do this alreday) and run the report based on that month only. Getting the report to run specifically for a month is what im unsure on? I though i would be able to set parameters within the report but these only enable my user to select a calendar date?
Is there a DATEADD or DATEPART type of function i can use to complete this task?
Regards
B
Best bet would be to set up a dynamic date default for the date patameter at the report level, and set up the subscription to use this default value, so whenever the subscription runs it would automatically have the appropriate date.
Probably the easiest thing to do is set the parameter as the current date, if that would work, e.g. something like =Today(). So that will be calculated whenever the subscription runs.
You can set the default value for whatever you need; first day of the current month, etc. You should able to set whatever value you need without too much trouble.
So for the first day of the month something like:
=DateSerial(Year(Today()), Month(Today()), 1).
Users running the report ad-hoc could just reset the parameter as required.
I'm assuming the report handles the amount of data to return correctly assuming the right data parameter is sent.
2 Parameters #DateFrom and #DateTo
Default Value for #DateFrom that outputs the first day of the current month:
=DateAdd("d",-Day(Today())+1,Today())
Default Value for #DateTo that outputs the last day of the current month:
=DateAdd("d",-Day(Today())+1,DateAdd("m",1,Today()))