SSRS showing wrong data after deploying report - reporting-services

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.

Related

SSRS Document Map is gone after exporting report with cached reports

We are using Microsoft SQL Server Reporting Services Version 15.0.1102.932 and Microsoft Power BI Report Server Version 15.0.1108.153.
Some of our reports have a Document Map. When we export to Excel we don't want the Document Map. In the DocumentMapLabel we have logic like this:
=IIF(Globals!RenderFormat.Name = "EXCELOPENXML",Nothing,Fields!PAGR_ID.Value)
This works great. However, we have found an issue when the Caching is set to use a cache that expires in X minutes or always run from a history snapshot (option 2 or 3). After you export to Excel then run the report again for the same parameters, the document map is gone.
It appears when you export, the server fetches the data again so it can render it in the desired output format and creates a new record in the SnapshotData table in ReportServerTempDB. I queried that table before running a report for the first time. Ran the report, queried again and saw a new SnapshotData record, as expected. I ran the report several times and noticed the table field TransientRefcount was increasing with each run. Nice to know we can look at that and see how many times a cache has been accessed. I then exported to Excel, queried the table and noticed a new record was created. When I ran the report again with the same parameters I saw that new records TransientRefcount increase instead of the previous SnapshotData record.
Since our report turns off the document map when exporting to Excel, this new SnapshotData record doesn't have the document map in it. Now when you run the report again with the same parameters, the document map is gone, because the server is grabbing the most recent cached data.
Has anyone encountered this and found a way to fix it? A different way to turn off the document map?
I tried creating two tables, one with the document map and one without where the visibility of the table with the document map was set to hide if the RenderFormat is Excel and the other table hides when it's NOT Excel. But that didn't work, the cached version only displays the version without the document map. Which makes sense since the most recent cached version doesn't have a document map and it can't turn something on that isn't there.
One thought I had was to set the Globals!RenderFormat.Name to "RDL" when the report first runs before any parameters are entered, but I can't figure out how to do that. Maybe with some code? I've not used code in a report before so don't know how to do that.
Any thoughts? Thanks very much!

SSRS 2017 Subscription can't be created or edited because the credentials used to run the report are not stored

I have an ssrs server that is not allowing me to create subscriptions for some reports. There are 20+ reports in a folder which all use the same data source: /Data Sources/MyDataSource. The credentials are stored in the data source. I can add subscriptions to most of the reports, but there are a few which throw the following error:
An Error Has Occurred:
Subscription can't be created or edited because
the credentials used to run the report are not stored, or if a linked
report, the link is no longer valid.
I have tried deleting the report and re-uploading them, deploying the whole bit from the project and adding another data source with the same stored credentials. However, I still get the same warning triangle on the subscription button. There are a batch of new reports I have added, some have this issue and others do not. Restarting the SSRS service did not help.
Any other ideas for troubleshooting this?
Bonkers! Looks like the issue was a case sensitivity one. In the project, all of the reports referred to a shared data source. However, sometimes the reference to the shared data source was spelled "mySharedDataSource" instead of "MySharedDataSource"
I found a hint of this in the logs, which complained about the first version of the spelling which did not exist on the report server. Fixing that and deploying the report corrected the issue and now I can create subscriptions.
Might be a 2017 thing, I have these reports both on a 2016 and 2019 instance and they have not complained.

SSRS showing old data in Report Server

We have 1 report that's being exported to PDF manually in the web page.
However, when we update a certain value, the new value can be seen in the table but when we tried exporting the data, it keep showing the old value in the report.
The stored procedure used in the report is showing the new value.
It works fine when running the VS 2013.
I am not sure if caching is enabled in our report server but in that RDL file, we did not explicitly specify to cached the data as shown below.
Processing Options Screenshot
Snapshot Options Screenshot
Parameter Settings Screenshot
There are no RDL.Data files in the report server as well and other reports are extracted to PDF and its working fine.
Do you have any idea or did I missed something that needs to be checked?
Thank you.

Parameter Value: "Get values from a query" not working on host

I'm having problems when using the option "Get values from a query" in my Parameter settings.
On the server everything works like a charm.
But when I deploy and then launch the report on my hosting, I get an error message:
If I use the option: "None", then everything works fine.
I've placed a test Tablix, to see the result of the dataset on the host, and also this causes no problem.
So the issue is only with the "Get values from a query" section AND only on the hosting.
Anybody got an idea?
EDIT: I turned EnableRemoteErrors on, as requested by the errormessage, but no additional info is given.
The detail of the error is in the SSRS log file located at -->
<SSSRS_INSTALL_DIR>\Report Server\Log Files.
That is where I would go. Based how you describe the dataset driving the parameters works but not when given a value then I would expect this to be a parameter mismatch or missing parameter. Make sure that you are feeding the dataset the parameters you think you are. Also, if you don't allow nulls then make sure you are supplying a default value.
You said, you placed a tablix on the report showing the results of the YearsDOW dataset and this fails. If this also fails when you set your available values to 'None' then we can assume, as the error states, that the issue was with executing the query itself, not your report design.
As this seems to work when you run it from your local machine in development but fails when run from the server I would suspect it's an authentication/permissions issue.
Check the credentials on the datasource in your development environment and compare these to the SSRS server's version of the datasource. Remember, by default datasources do not get overwritten so it maybe that you deployed the datasource initially with one set of credentials then then changed them in your development environment.
If this is the case and the datasource is not used for other reports on the server, then you can either change the project properties to overwrite datasources but personally I prefer to delete the datasource from the server and then redeploy, that way future changes won't affect the servers version unintentionally.
If the datasource is used in other reports without problems then you could just rename the datasource to something unique so it will get redeployed under the new name and your report will point to that new version.

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.