2
votes

I have created a report an SSRS report in VS 2008, and running it on a Windows Server 2012. When I run the report from Report Manager, it runs with no issues. However, when I set up a scheduled subscription, I get the following error message: Failure sending mail: An error occurred during rendering of the report. Mail will not be resent.

I have tried a number of Render Format options, including Excel, Word and CSV. It has failed on each of these formats. I did try the 'XML file with report data' option and the mail was sent. I also used the 'Include Link' option without including the report and that worked.

I have also set the Report Timeout option to 'Do not timeout report' in the Processing Options but still got the problem.

I am also running another report that is identical, except for the time interval and it runs fine. The report that is failing captures weekly data, while the report that runs OK captures monthly data.

Any ideas of what is going on with this report? I have provided all the information I can think of, but if anyone needs anything additional, please let me know! Thank you for your assistance!

2
My first thought was that you need to configure SSRS to use a mail server but you have another report that works, right? The next question is what time does the report render? It might be during the night while the server is busy. I would take a look on the report server at the logs and see the detail of the error. The last clue is that the monthly data works but the weekly doesn't. How big is the resultant file? Maybe it's too big for your email network. - Davos
Thanks for the thoughts @Davos. I will check the server logs and let you know what I find. - Jerry C
I think your problem is authentication. Is the other report that works using a different datasource? What user is the report rendering as? If you are used to running reports with Windows Authentication then what user does report manager use when a real user isn't there to provide the Auth? When you do an email or other subscription ideally you set up a specific user that you can save with the datasource settings and then it will work. - Davos
Thanks for the input Davos. After checking the logs and not finding anything, and putting the report on hold for other priorities, we got back to it and started from the start. Initially, we renamed the report to remove some spaces and characters (some bad practices left from folks who have long since moved on). Once we did this and tested it, everything worked fine and has been working for about a week now. Although our team now uses standard programming practices, there are alot of legacy stuff around. I didn't know this was an issue with SSRS, but it seems to have been a fix on this. - Jerry C
I don't tend to use spaces in report names, but I've just had a look and there's a bunch of reports on one of my 2008R2 servers that have spaces in the names. Is that the only thing you changed? Did you rename the datasource as well by any chance? What version of reporting services are you running? Just curious in case I see this in the future. - Davos

2 Answers

0
votes

Although I am not 100% certain of this, after I changed the name and removed some special characters (primarily parenthesis) and this seemed to clear it up.

Edit: After a significant span of time has passed I am certain that this was not a fix. I have a couple of reports that seemed to run fine for a while but then failed. When running the report from Report Manager it runs fine, and can be exported without any problem.

I subsequently ran the report from Report Manager and exported it into a .csv file. After opening this file in a text editor, I noticed that there were double quotation (") marks randomly distributed throughout the report. This did not show when exporting to excel. I rewrote the script to replace the quotations with blank spaces. I ran it again from Report Manager and exported it again to .csv and there were double quotes in the result. When I do this from SSMS I don't get the double quotes. It appears then that this occurs as a result of the export. The report will display in Report Manager, but won't go out in subscriptions.

Any ideas or suggestions would certainly be appreciated. I have worked on this for a while now (months) and need to come to some resolution. Thanks!

0
votes

The solution ultimately was found and solved by updating the sql server with a service pack that was missing.