SSRS Subscription File Name w/ Date - sql-server-2008

I have a series of reports that run at different schedules (hourly, daily, weekly, etc)
The reports are saved to a share \unc\reports\department\
report
report_1
report_2
report_3
As this is the only way to create a new version.
My question is if there is a way to append either execution time or even just the date so the end user can see the time the report was generated.
Currently it is done by looking at date modified properties, which is Ok, but not ideal.

You can capture the runtime with #timestamp variable and stamp it with your Report filename. Append #timestamp with your filename in the subcription manager as shown below.

yes, this is possible, you would need to use a data driven subscription. Here is a good how-to on it:
http://www.bidn.com/blogs/briankmcdonald/bidn-blog/1255/appending-date-to-end-of-report-name-in-reporting-services-subscription

Related

Why SSRS are date parameters invalid when from a selection but not when "default"?

I have a selection of SSRS report where the client has requested that there is a different reporting range for each schedule e.g. The daily schedule run Daily reporting on sales for the past day, the Weekly schedule to report on previous week etc. I am trying to use one "sales" report to do this and have different options for the "Start" date as a parameter that can be selected. I have set these up as "Available" values rather than a "Default" with the following:
Daily = =DateAdd("D",-1,Today())
Monthly = =DateAdd("M",-1,Today())
I have set up a scheduled for this report to run using the parameter and selected "Daily" but when this runs I get the following error message:
The subscription contains parameter values that are not valid.
And then if I look at the subscription settings, the "Start" parameter is completely blank forcing me to select Daily or Monthly again. If I were to instead set it up as a default value using one of those parameter mappings then it works absolutely fine. Is there a way to have these optional parameters, or am I going to be forced to create different Daily/Weekly/Monthly reports each with their own default parameters for the start times.
Note: When I debug the report with those parameters it runs absolutely fine, the issue is with the scheduled versions not keeping the parameters.
If you have access to data-driven subscriptions with your SSRS version, you can pass in multiple dates, emails, etc. This allows you to send out different versions of the report in one subscription.
Another option would be to add another parameter with the Daily/Weekly/Monthly option. Then have the default date use this parameter value to determine the date value. Then you could have 3 subscriptions on the same report each with their own interval selected.
I hope one of these options will work for you.

SSRS report change date based on subscription

I'm trying to set two different dates for the same SSRS report.
What the report basically does is check a StartDate and EndDate these dates are default to yesterday.
But I have to implement a new subscription which has to look to the beginning of the month.
I've been investigating and I couldn't see any configuration rather than change the default date, but this will break the first subscription.
I'm thinking to add a boolean flag saying "check from the first" and an if inside the SQL query.
but I would like to know if there is any better approach rather than this "hardcoded" and ugly way, using the subscription if possible.
Thanks.
You can use a data-driven subscription to calculate the parameter values for the new subscription you want to create. Write a SQL query that gets the two date values you want to use. Then you can pass these in to override the defaults. You don't even have to edit the report and it will be dynamic.

Seperate SSRS report weekly between a date range

I currently have to run a report weekly back to 2014 till now. Is there a way where I can provide it a date range of 4 months and the report can be divided by calendar weeks within the date range?
Any questions, feel free to ask. Thanks
Create a data-driven subscription on the report.
Build a query that returns a table with one row per each set of parameter values you want to run. Assign the columns to the correct parameter and then run the subscription.
If you have specified a file share as the output, all the different versions of the report will output to that share.
Obviously this requires you to provide SSRS access to that file share.

Change format of column in SSRS during export

I have some date columns in SSRS that, when our internal users view/review data, need to be shown in the usual mm/dd/yyyy format. The users also dump this report to Excel. In the export, I need to convert the date to a string and format it yyyymmdd.
Is it possible to change the output format of a column only during an export?
EDIT: (based on comments below)
I love the phrase "almost exactly" :)
The other question mentioned below was asking WHY dates appear a certain way in Excel AFTER exporting but I wanted to change the format BEFORE or AS the export happened. My question had NOTHING to do with regional settings as the question referred to below mentions.
What I needed was for the date to show on the report (at the report server, on-screen) as 8/13/2013, let's say, but when I export it to Excel I needed a format of 20130813.
To be helpful to those that read this, adding a parameter to the report header, allowing the user to change a selection to run the report in two separate "modes" worked for me.
What I did was add a reportMode param, give it two values, say ModeA and ModeB. I defaulted the param dropdown to ModeA. In the date column, I simply checked for how the param was set and changed format of the date, through an expression prior to the user running the report. This way the users can have ModeA to use when they are checking data but when they export this to excel for our external customers, who require the dates to be in the other format, they can choose ModeB, run the report again and then export.
Hope this helps somebody else.

SSRS - Is there a way to restrict date/time input parameters to date only? (Not report output field format.)

I am writing an SSRS report that has several parameters including a couple of date fields. I do not want the user to be able to enter time information in either date field, but SSRS only has the Date/Time data type. Is there a way to force these report parameters to act as date only, and can I set a specific format (e.g., dd/mm/yyyy)? I would like to keep the built-in date-picker-calendar functionality.
I do not want to write my own report parameter web page because if I did then this one report would be the odd one out given that all of our other reports (which don't use date parameters) work fine with the built-in SSRS parameter entry functionality.
Perhaps the answer is that you can't do it with the built-in options, but that seems crazy - how could something so obvious have been overlooked?
The Google and Stackoverflow searches I've done only gave me ways to set the format in the report output (actually there are a number of cases where people have asked a question similar to mine and only received answers about setting the output format).
The problem is that you are using parameters that get timestamp information.
For example, if you are using Now() in your expressions- you will be asking for the current date AND the current time. However, if you use Today()- you will only be asking for the current date.
=Today() 'returns date only
=Now() 'returns date and current timestamp
Useful references:
http://msdn.microsoft.com/en-us/library/ms157328(v=sql.90).aspx
http://msdn.microsoft.com/en-us/library/ms157328.aspx
To answer my own question based on research I've done since asking it: it seems it is not possible to control how SSRS handles user entry of date/time values in parameters. If there is a need to restrict to date (or time) only or do cross-field validation then you need to implement your own front-end - which unfortunately for my specific business case doesn't help.
In my experience it has only given me the date and time when the filed you are selecting from contains both date and time. I have found if I am selecting on a date only field then I only get the date in the parameter
There is a way, but it will require you to CAST your date as Varchar(10) in your parameter dataset.
Next,You'll have to choose "Data Type:" as Text under Parameters section.
Again, you'll have to make sure your SQL code re-converts it into date again. I do not prefer this way, but users really wanted to see date without time.
Let me know if you'd like screenshot or more detail.