SSRS subscription fails on rendering - reporting-services

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!

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!

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

Related

'No Current Record' Error when Outputting Report to PDF from Batch File or Task Scheduler

The Problem
I'm using a scheduled task to open an MS Access database, run a macro to email a report in PDF format, and then close the database. The report is relatively basic and the macro simply uses the EmailDatabaseObject action to export & email the report in PDF format.
This has been running successfully on a daily basis for the past 4 years on a Windows 7 machine running the latest version of Office 365 compatible with Windows 7.
I've recently updated the machine to Windows 10 and I'm now encountering a No Current Record error when running the scheduled task. After clicking OK to the error several times, Windows reports that MS Access has stopped working and the application crashes.
If I manually open the database and manually run the macro, everything is successful.
Setup
Windows 10 Pro 20H2 (19042.964) 64-bit
Office 365 Apps for Business 2104 (13929.20296) 32-bit
My Research
I've found this MS KB article describing the issue, however, this reportedly applies to MS Access 2003 & 2007. My report has no grouping, but does contain summations in the report footer. However the suggested solution is not feasible since removing the summations would remove necessary information from the report.
I've found this related question, however, this attributes the cause to accessing the database from OneDrive as opposed to a mapped network drive, whereas I am accessing the database from a mapped network drive.
This looks to be the same issue, but I cannot access the 'solution' at Experts Exchange...
What I've Already Tried
Rolling back Office 365 to an earlier version (version 2101).
Running the Scheduled Task with Highest Privileges - but this results in no access to mapped network drives.
Running the macro from a batch file.
Opening the database from another PC and running the macro from a batch file.
Perform the operations using the AutoExec macro rather than invoking a specific macro by name.
Imported all objects from the database into a new local database.
Exporting the report as a PDF locally using the ExportWithFormatting action.
Using the DoCmd.SendObject method to email the report - this results in MS Access immediately crashing.
Changing the default Windows printer & default report printer to 'Microsoft Print to PDF' to rule out possible printer driver issues.
Current Workaround
I've found that this error only arises when the export format is set to PDF; as such, my current workaround is to export the report to RTF format - but this is obviously not ideal.
Update
I've now systematically removed items from the report until I was able to run the report successfully from the scheduled task.
I removed items until I was left with a single static label in the Report Header and a set of fields in the Report Detail referencing basic numeric & text data from a single table in the database.
Removing the Report Header & Footer resulted in the report running successfully from the scheduled task, and so I determined that the issue must be caused by a setting associated with the Report Header/Footer.
I isolated the issue to the 'Force New Page' setting in the Report Header:
With this set to 'After Section', the report crashes; but if this is set to 'None', the report is successful.
However, when setting this to 'None' in the original report, the report still crashes when run from the Task Scheduler and output to PDF.
Steps to Reproduce the Problem
I've uploaded an incredibly basic database here, containing a single table, a single report, and a single macro which executes the ExportWithFormatting action followed by the QuitAccess action.
To reproduce the problem, open a command prompt window and issue the following commands:
cd C:\Program Files (x86)\Microsoft Office\root\Office16
msaccess.exe C:\YourPath\test.accdb /x macro1
MS Access should then open and you may be presented with the 'No Current Record' error.
Has anyone else encountered this issue and knows of a solution?
Many thanks for your time.

Report showing 'The definition of the report is invalid' in SSDT 2015

I have a SSRS 2008 project with some reports, and recently we update the version, now I open the project with the SQL Server Data Tools 2015, and all is fine, I can deploy, edit, update all fine.
The problem comes when I want to create a new report, when I add a DataSet to the report, the preview tab says:
An error occurred during local report processing
The definition of the report 'Report Name' is invalid
and nothing more happens, I can't preview the report anymore.
Does anyone know if it is a issue of upgrade/open a SSRS 2008 solution with SSDT 2015?
After some research... I couldn't find anything.
So I tried to create the report in Reporting Services 2008, and when trying to preview the report after adding a DataSet it show me the same error:
An error occurred during local report processing
The definition of the report 'Report Name' is invalid
But now, it has an aditional line:
The shared dataset definition is not valid. details the required
attribute 'name' is missing
And after enter the first search result in Google, it looks like the problem was that my DataSet was a Shared DataSet, JoannaK found the same problem and also found a workaround:
Found a workaround for now: Create the data set as embedded> Convert
to Shared Data set Looks like the Name property is set when you start
with embedded. report runs and can data sets can be uploaded to the
report server
This solves my problem. Hope it helps someone in the future.
Source: JoannaK from SQL Server Data Tools Preview update for April 2016
SSDT is generating a broken dataset definition. To fix it:
Open up the shared dataset's .rsd file in a text editor.
In the xml therein find the <DataSet> opening tag.
Add the attribute Name (case-sensitive) to that tag, e.g: <DataSet Name="SomeDataSet">
Probably should set the Name to be the same as the filename but doesn't seem to make any difference as far as I can see.
Thanks to the existing answer as without that I never would have got it to work at all.
VS2015 / SSRS2012
I experienced similar error. It mostly occurs as of change in 'SHARED DATASET'.
Check for query fields in 'Shared Database Properties', if no fields are there , simply add fields you have included in your query.
Check for database connection
Check for 'Stored Procedure' and it's result if you have used stored procedure.
One can delete old dataset and re-create with same name.
As a last option, one can create 'New Dataset' (another one) and bind the new one with the report(take care to map all fields again once you choose to create new dataset.

SSRS showing wrong data after deploying report

I am having this problem where the data being shown in report is different when I deploy it on server. So let's say if I am viewing report by pressing F5 (to debug) or by clicking on "Preview" button on the report in BI Studio the data shown is correct. But when I deploy the same report and when I run it from server such as http://myserver/reports then data shown is incorrect/missing.
For e.g. in some cases it is not showing data for a particular field and there are some number fields which are showing wrong data. I have cleaned the solution, deleted data cache files, rebuilt and deployed like 100 times but no luck.
When I deploy it shows some warning (which I guess I can ignore) but no errors.
I have checked the database by running queries and stored procedures directly and they all return correct data.
How do I fix this issue?
I went to report server and looked at the XML of one of the data set which was creating problem and found out that the new FIELD I have added is not there. Then I tried to deploy that data set and it said Overwrite Dataset property is set to False and that's why it was not deploying and I missed it in messages when it deploys a solution. So I simply set the property to True, deployed it and viola problem is solved.

SSRS different results in Data tab and Preview tab

I get the correct results (nov and dec data) when I run a query in the Data tab of a report that I built in SQL Server Reporting Services. When I preview the report I get old data from October. It doesn't make any sense to me. I'm not sure whats going on. Note: the data is in Oracle.
Here's the date filter I'm using
receipt_date + 2 <= SYSDATE
The query works fine in SQL Developer and in the Data tab in the .rdl designer in Visual Studio... just not in the Preview tab when I run the report... that's when I get Oct. data.
Anyone know what's going on here?
SSRS caches data locally for use by the designer. The cached data is only updated if the developer previews the report in VS.NET using a different set of parameters, which in your case never happens because the report has no parameters.
To allow SSRS to refresh the cached data, navigate to the directory which contains your design-time RDL file and delete any files which have the extension ".data".
This is way too late, but maybe this can help someone else in the future.
When developing SQL Reporting Services reports, a really annoying function is that preview data is cached locally when testing reports instead of fetched on every run. Even explicitly refreshing the data doesn't always fix this. The most reliable way to resolve this is to delete the .data file associated with your report RDL file. These data files are stored in the same folder with your report definitions.
While you can delete these files manually, the following 15 second configuration change to BIS makes the process of deleting all data caches as simple as a menu selection.
Let's see how to achieve this.
In Visual Studio -->
Go to Tools - External Tools...
Add a new tool with the following settings:
Now whenever you want to delete your report data cache, just go to Tools - Clear Report Data Cache.
The only thing that works for me (in 2008 R2) is deleting the .data file and rebuilding the report. The refresh button on the preview tab does nothing nor does editing the RSReportDesigner.config file (located in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies). Very frustrating. If I change the query or sp logic I now have to manually delete the .data file in the report project directory in order to see the the most recent rendering of the data.
Hope this was fixed in SSRS 2012 data tools.
see the links
http://connect.microsoft.com/SQLServer/feedback/details/522670/ssrs-turn-off-local-data-cache-in-bids#
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/145ac9ac-b247-47d2-a787-98a8fcfad053
The link in Greg's post points to this workaround, added after Greg posted: http://blog.summitcloud.com/2010/05/disable-reporting-services-data-cache-in-development/ That explains which config file controls the data caching, and says that refreshing the preview may actually get you fresh data. (I'm running a long query now, so I don't know yet if that works.)
Try hitting the Refresh button on the Preview tab.
If I understand properly, that is the same issue I had with mine.
I could see the query run successfully in the Report Data window but whenever I ran the Preview of the report, I was getting no results.
I realised after a bit of mucking around, all I needed to do was hit the Refresh button (mini icons on the the Preview tab) to get the Preview refreshed with the new data.
Is there anything different regarding the dataset's parameters? Do report parameters feed the dataset at all? If so what are they?
Is the report a server report? If so what is the time set to on the server?
There are no report parameters.....the exact same sql is run everytime. I'm not sure what you mean when you ask if the report is a server report.
i have one theory that i haven't been able to test. this report is not deployed to Report Manager but is being run from Visual Studio. I don't know if that makes a difference.
Pressing the refresh button in BIDS VS2010 for me isn't working. Nor did deleting the cache file. My issue was that I didn't have a Row Group - so it was only showing one (old) record on the report.

SQL Server Reporting Services Default Values From Query not working in deployed report

In order to populate a textbox in a page header I am setting up a parameter (as you cannot use Fields) and referencing this in the textbox. The parameter has the Default Value set to "From Query" and the Dataset and Value Field are set accordingly. This works a treat in developmentt in Visual Studio 2005. Once I have deployed the report and am viewing the report in the ReportViewer control I get the error:
"Parameter validation failed. It is not possible to provide valid values for all parameters. (rsParameterError)".
If I remove the parameter, the report works fine.
(Strange thing is that I thought I had this working earlier).
You've probably checked, but has the default value copied over? I've had issues in the past with reporting services where the default values were lost when I moved a report from one box to another.
Thanks for the answer - it has pointed me in the right direction...I have been using my own program to deploy multiple reports so rarely look at them via the Report Manager website. Anyway - I just deployed the report on my home PC and it worked fine....looking at the report in Report Manager on both PCs I found that "Prompt User" on the PC that wasn't working was not ticked...go figure. Ticking this resolved the problem.
I am liking the results that I am getting from SSRS, but I am quite new to it and am finding some things (like this) a little frustating...mouse and keyboard are lucky to not find themselves thrown out the window!