I have a report that is scheduled to be emailed out every Friday (weekly report. If the Friday falls on a holiday is there any way to make this report be emailed out on the Thursday instead, via having the holidays stored in a table or of a similar nature.
I guess the more appropriate question might be: is it possible to create a data-driven schedule in SSRS?
To be specific, all holidays would be user defined. Ideally stored in an SQL db. If the date that the report was meant to go out exists in this table than the report would be delivered a day earlier.
Reporting services cannot do that by default.
A workaround could be:
Create a table with holiday's
Create a weekly schedule for each report, setting Friday as the day to run
Create a scheduled task in SQL server agent to run on each week start, which will check if there is a holiday in this week. If it is, it will update the DaysOfWeek of the Schedule table on your report server from 32 (friday) to 16(thursday), otherwise it will set DaysOfWeek value to 32 (default)
Important: Backup before attempting any change on your report server database.
Related
My server rebooted and failed to restart SQL last week which prevent the SSIS from running. When checking the reports SSRS I am missing data from Thursday and Friday. I have users who need the SSRS reports from those days.
How can I manually run the SSIS jobs in SSMS for a specific date (so the data populates in the SSRS)?
Thank you in advance.
You need to variable date in the source query and in the project paramters. When you run that every day, I assume it is scheduled job (or similar ptocess) so you can put today's date on the job. And that way you can run for old dates by giving the date.
So from here I would look where the data is coming,
case 1) if there is already that data in the source and your SSIS is limited to today's date only. That would be easier to resolve as you just have to select previous dates that you need.
case 2) the source has only today's date? I cannot imagine that is the case but if so, look for back up of that data or where does it go.
I want an SSRS report to send a report subscription (email or file share) based on a Data Value change in the report data set.
Let’s say 500 rows of the Newest Data in a table all have "Update Time= 9/19 1:40 pm” and then 50 minutes later that table is updated to insert 200 new rows with "Update Time=9/19 2:30pm”. The data value change in this example is the ‘Update Time’ has changed on all records. I want SSRS to be triggered at 2:30pm based on in this change in the dataset records, and then SSRS will email the new 200 records.
Can SSRS do this kind of delivery? Is “data-driven” the answer? (Doesn’t look to me like data-driven solves this problem; but perhaps I am just not understanding?). Does snapshot update achieve this? (I thought snapshots are also time driven?).
SQL Version:
Microsoft SQL Server 2016 (SP2-CU2) (KB4340355) - 13.0.5153.0 (X64)
Jun 28 2018 17:24:28
Copyright (c) Microsoft Corporation
Enterprise Edition: Core-based Licensing (64-bit) on Windows Server 2012 R2 Datacenter 6.3 <X64> (Build 9600: ) (Hypervisor)
NOTE: I will use RANK() windowing function to achieve that grouping pretty easily-- It would group everything as 1 (200) rows, 2 (500) rows, etc. I would keep only group 1, so all of the records would have a new ‘Update Time’.
https://learn.microsoft.com/en-us/sql/reporting-services/subscriptions/subscriptions-and-delivery-reporting-services?view=sql-server-2017#triggering-subscription-processing.
Triggering subscription processing
The report server uses two kinds of events to trigger subscription
processing: a time-driven event that is specified in a schedule or a
snapshot update event.
A time-driven trigger uses a report-specific schedule or a shared
schedule to specify when a subscription runs. For on-demand and cached
reports, schedules are the only trigger option.
A snapshot update event uses the scheduled update of a report snapshot
to trigger a subscription. You can define a subscription that is
triggered whenever the report is updated with new data, based on
report execution properties that are set on the report.
Processing a data-driven subscription
Data-driven subscriptions can produce many report instances that are
delivered to multiple destinations. The report layout does not vary,
but the data in a report can vary if parameter values are passed in
from a subscriber result set. Delivery options that affect how the
report is rendered and whether the report is attached or linked to the
e-mail can also vary from subscriber to subscriber when the values are
passed in from the row set.
Data-driven subscriptions can produce a large number of deliveries.
The report server creates a delivery for each row in the row set that
is returned from the subscription query.
As far as I can see, you are correct. The snapshot update method would require snapshots to be created and snapshots are only created on a schedule or manually by a user.
What might have less overhead than a datadriven subscription is to have a stored procedure that runs the simplest query to detect if any pertinent data has changed and, if so, trigger the subscription.
EXEC dbo.AddEvent #EventType = 'TimedSubscription', #EventData = '00f4ecee-891d-445f-ae81-24ef62d3fb53'
Where the Event Data is your subscription ID (copy the Edit subscription link to get the ID)
Of course you'd have to run an SSIS job to execute your stored procedure every 15 min or so but I think it's better than the data driven subscription.
There is a table that stores my users date access, the time stored in this Table is 5 hrs ahead.
i.e. there is a user that access at 4:02 am on my live report
but when i run the query in SQL shows he enter at 9:02 am
How can i compesate for that on my Query?
Your database is running on UTC (CDT+5). If you need to adjust to local time, you can use the CONVERT_TZ() function.
More info: https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html
Can anyone tell me if it is possible to view the parameter details each time a particular subscription was ran in SSRS 2008 R2?
I can see in the reportServer DB the executionLog table, but this does not record the actual Subscription that ran (we can have dozens of subscriptions per report). Also I cannot join the subscription table to the executionLog table as the only key is the ReportID.
I can find the specific subscription in the Subscription table using the description, but I need to find an audit log of changes that were made to each subscription over a period of time eg - the DataSource was changed or a paramter was changed from A to B. I know that these changes can only be done with a certain security level and each time the change needs to be saved - but can this info be pulled for specific subscriptions?
Thanks
I have the database in sql 2008. In this database daily some data is being inserted. I have to generate the report automatically without giving date i.e today is 10-10-2012. I have to view the report of 10-10-2012 on 11-10-2012 daily. It should happen automatically i.e Previous date entry should generate on current date without changing dates daily. Whether it is possible in SSRS report or we have to change in stored procedures please give the solution.
Yes, it is possible. I just did it.
Two options:
1 Specify the report parameters (dates) and give them default parameters. (Use a formula - hint, look for DateAdd in the formula editor)
2 set the query using DateAdd in SQL
When you've got the report, create a subscription.
How to do all this is covered in the documentation, available from Help on the SSRS website, or by pushing F1 in the Report builder.