SSRS Reports location when being deployed - reporting-services

I'm just helping out while our regular SSRS guy is away and having an issue.
There is currently a very large report that's being generated. The subscription settings for this report is to ftp the report. The Subscription status for the report currently says "Processing delivery...". I assume this to mean that it finished generating and is now trying to send the file to the ftp location. I can see that the file is there in the ftp folder but the size is still 0kb. It has been saying "Processing delivery..." for a long time now.
My question is: Is there a location (folder or sql table) I can check to see if ssrs is actually doing something? I assume it would create temporary file somewhere locally first before sending it on its way.

Check the ExecutionLog views in the ReportServer DB of your SQL Instance. There are three views which show everything from the requested format to start time, complete times, and parameters used. Take a look at the time difference between start and complete for previous runs and compare it to the running time of the current report whose complete time will be null if it is still processing.
For bonus points: setup a SSRS report based on the view and set a subscription for daily email delivery. This saves a TON of time when troubleshooting reports where users can't tell you the parameters they use or the morning reports are empty, etc.
Also, funny as it sounds, you might want to check the free space on the server that the report is output to. With no free space the report will show processing delivery for a long time. If it's FTP and you don't have control of the FTP server, still might be worth the quick phone call.

Related

SSRS randomly gets error for parameter - solution is to rebuild report...then it happens again

I am pretty experienced in SSRS, I have been doing it for quite some time so I know when I see the error:
"An error has occurred during report processing. (rsProcessingAborted)
An attempt was made to set a data set parameter '#SiteId' that is not defined in this data set. (rsUnknownDataSetParameter)"
I know what causes this error and can fix it. However, this error randomly happens every so often. What I end up doing is simply rebuilding the project and redeploying it and all is well for a few days, then suddenly again this same error will pop up again.
I know there is no issue with the parameter as I have a #SiteId parameter as shown:
So when I get an email from a user that "The Report Is Down" I just go to my report and rebuild and republish and the error vanishes without ANY other changes. A few days later when they want to run the report again this same error happens. What is causing this issue to come back over and over. We are running SQL Server 2016 with SSRS. It happens to ANY one of my reports on the report server. Its not a specific project it randomly happens on any project.
EDIT
What I did notice does happen is when a user reports this issue I go to the "Manage" of a report on the report server url. This area is where you find the properties, data sources, and parameters. When I click parameters I see this error:
So obviously something is destroying the parameters - that is where I am confused what is causing that. This is probably why I am getting the error message. So to reiterate a report is published works...suddenly the parameters go missing. User reports "the report no longer works" I rebuild and redeploy the report...it then works again for a day or so maybe more than a day I never investigated how long it takes for it to break again (as these are not urgent reports). Days later user says report is dead again...if I go to the report server using the report server url and click "Manage" and then click "Parameters" for some reason the parameters have disappeared...causing me to yet again redeploy. This happens over and over and over. It never ends...
The short of it is you cannot have the same shared dataset name across different SSRS Projects that are on the same SSRS server.
So within our SSRS "repository" we have several different SSRS projects. Both projects are very specific to certain functionality. What I noticed is everytime I deployed one of these SSRS projects the reports on the other project would stop working.
When the email would come from the user stating Application A's reports werent working I'd go to Application A's SSRS project and redeploy it and it would fix the issue. Days later a different user said Application B's reports weren't working so I would redeploy application B's. Not knowing that when I deployed A's reports B's would break, and vice versa deploying B's broke A's.
Come to find out....both projects had a shared dataset with the SAME NAME (dsEmployees). Same name however these datasets pointed to different sprocs with different parameters. Well when you deploy and look at the back end db the Catalog table only has one entry for dsEmployees. Everytime I redeployed this would overwrite with the other dataset since the names were the same.
Lesson learned across different SSRS projects be careful with the shared dataset name, they must be different. I was able to spot the difference by running the following query:
SELECT
c.Name,
c2.*,
c2.Parameter
FROM
DataSets d
INNER JOIN
[Catalog] c
ON
c.ItemID = d.ItemID
INNER JOIN
[Catalog] c2
ON
c2.ItemID = d.LinkID
WHERE
--one specific report for now
d.ItemID='C3008EF4-E544-48F3-92C1-2222C6148B13'
When the report was stated not to work. Then I would redeploy the report and rerun that sql statement I wrote and dumped the rows to an excel sheet to compare. One of those columns is Parameters and I noticed the parameters were slightly different. Immediately I was onto something and this ended up being it. Thanks to comment posted it helped me relook at this! This has bugged me for years!

How can we use a bot to check with SSRS if the reports ready to view in certain time intervals

How can we use a "bot" to check with SSRS if the reports are ready to view in certain period of time intervals. for example like every 3 minutes the bot will check with SSRS if the reports are ready. If the reports are ready the bot can send a message back to client saying the reports ready to view.
Thanks
I am not entirely sure why you want to do this, but you can track every execution of every report in SSRS via the ReportServer database. You can have a look through the database and roll your own script, though there is already a helpful view available called ExecutionLog3, which holds the report name, user that ran it, when, with which parameters set, the render type, execution failure/success, etc.

SSRS Subscription strategies

I'm hoping someone with a little more experience than me will know a better way to schedule SSRS reports.
Here is my situation: I have a report on my SSRS report server which takes about a minute to run. I have about a dozen subscriptions setup on the report which cause it output into an excel file on a network drive every hour. About a dozen users check this file regularly, as it contains an queue of work that's come in from their helpdesk.
I believe the users are leaving the file open in Excel, because periodically the files starts locking and I get these errors:
Failure writing file : The process cannot access the file
'' because it is being used by another process.
Even though I've told them all to make copies of the file and only open it locally, they still are having trouble with this.
It seems like a natural way to use SSRS, but because of human tendencies, it is not really working. Is there a better way to do this?

SSRS - Recovering report on smtp failure

Shortly, is it possible to recover the report that was generated by SSRS when SMTP fails?
Sometimes we have network problems with SMTP and even the report was generated it couldn't be sent. We can send them manually later, but the problem is that most reports needs to be generated at a specific time, otherwise data my not be correct (for example, end of day reports needs to be generated at 12:00am, otherwise some updated numbers may not be correct. But we want to resend the report generated at 12:00am when we come to work in the morning)
I considered sending these reports though snapshots but some report subscriptions have parameters, and I couldn't find how to take snapshot for each subscription.
Any ideas?
Thanks in advance,
Onur
You could capture the data each day at 12am using a sql agent job which executes a stored procedure to populate a table/tables with the data.
If this is a report which can also be run live, you would run the report based on a hidden parameter #extract_type indicating whether or not this is live or snapshot. The default would be "live" and the subscription would pass "snapshot" for this parameter. The code in each dataset would filter based on #extract_type, perhaps through a view.
This way, the subscription could be re-run at any time of day with the same report results.
well, first you're not alone. i had issues with smtp errors in all places i worked.
there is a LastStatus column in [dbo].[Subscriptions] table. you can make a job that runs every few minutes, checks this table and restarts all subscriptions which have smtp errors.
like SQLDiver, i think it's a good idea to store the data behind reports in a table. it's not a job for a reporting tool to store your data.

SSRS Report Subscription emails stopped sending

Our reports in SSRS stopped sending. The last report was sent 2 days ago, and was send successfully, but since then none of the reports are being sent.
If I look at the SSRS web page for each report, there is no error. Simply showing the last run time as 2 days ago, so seems it didn't even try send.
Yesterday we did make some changes. But only moving a database from the Express version, to the regular version. We did not do anything that would affect the SSRS metadata (or at least we don't think we did...)
Where should we start looking to see why the report subscriptions stopped? Is there a process that could have accidentally been disabled? Thank you!
The Report subscriptions are created as jobs for the SQL Agent. You should see a long list of jobs with GUIDs as the names. Make sure that the SQL agent jobs are running. Going through the Steps of the SQL Reporting Services Configuration tool will recreate these jobs if you were to move the Reporting Service installation to another server. (I don't recall which step recreates the subscriptions. Just go through each pane and click "Apply.")
Depending on how you move things, you may need to backup and restore encryption keys, and you can easily end up in a state where two copies of subscription exist and are executed ( on different servers.) But in your case, where you didn't move SSRS, I'd look at the SQL Agent properties on the original server (Express) to see that the SQL agent is enabled and running, and check the history of the SQL Agent jobs, to see if there are any problems.