Reputation: 3299
I have updated the SP for the attached dataset that the tablix is using. The refresh worked fine and I can see my new fields in the shared data set when I look in the Fields tab. My problem is the tablix itself is not giving me access to the new fields. There is a disconnect somewhere and I cannot figure out hot to get the tablix to see the updated fields available in the dataset. I run into this problem frequently and hope I can get a good answer here to return to in the future as I am sure I will need to. I have googled and looked through the suggested questions here and I cannot find one that is directly related to this issue.
I will also know note that the report project is in TFS source control as I read that has some adverse side affects. I have marked the whole project for edit and also went to the folder structure and made sure everything was unset to read only.
I am using SSRS 2008 in VS 2010.
Upvotes: 24
Views: 65857
Reputation: 1
As mentioned above returning more than one dataset or having duplicate column names in the return set can cause this issue. I spent hours this morning figuring this mornings refresh issue out. It's similar to returning more than one dataset. It was my debug code. Even though I'm not returning more than one dataset if my debug parameter is set to 1 or 2 in testing it returns something like 100 rows of the last temp table it populated. Even though the report passes 0 for debug, those debug statements are what is causing to report not to refresh.
Upvotes: 0
Reputation: 1585
After I changed the stored procedure behind DataSet1
, nothing was working to update the fields list.
DataSetName
to DataSet2
Dataset1
Lived happily ever after.
This is in Visual Studio 2019 v16.11.26. SQL Server Reporting services v15.0.19528.0
Upvotes: 0
Reputation: 93
refresh and deleting .data did not work for me. So I just manually added the fields.
Upvotes: 0
Reputation:
Deleting .data no work for me. Deleting Dataset and adding again worked. And I had previously configured VS/SSRS to NOT cache.
Upvotes: 0
Reputation: 1797
After changing the Stored Procedure code, without changing the name and number of fields returned, I could only get the report to seemingly call the new format of the stored procedure by clicking the Refresh button in the report's Preview tab.
Upvotes: 6
Reputation: 609
Upvotes: 0
Reputation: 27
Clearing reportviewer's datasources works for me.
this.(reportviewername).LocalReport.DataSources.Clear();
Upvotes: 0
Reputation: 50
I am working in Visual Studio 2015 and none of the above answers worked for me. If you are getting the data from a stored procedure, you need to open the .xsd file and right click on the data model. Select Configure, and the correct values from the procedure should appear on the right of the window. Then refresh your dataset from the Report Data tab.
Upvotes: 1
Reputation: 19406
You can also delete the .data file if you still can't get it to refresh.
It appears to force the refresh probably because it has to recreate the file.
Here's a less invasive way but may not always work:
Upvotes: 19
Reputation: 5288
I had this same issue but the cause was different from the other answers at the time of this writing.
In my case, the stored procedure used as the data source was returning multiple data sets (due to some debugging code that I had left in there).
SSRS was "seeing" the fields in the first dataset, whereas I was expecting it to see the fields in the second dataset.
Removing the extraneous datasets fixed the issue and SSRS was able to see the fields that I intended.
Upvotes: 0
Reputation: 21
Old thread, but I ran into this using VS 2015 and SSMS 2016. I was certain it was an issue with VS. When I went back to SSMS and tried executing my stored procedure, however, I found that passing certain parameter values would cause the query to fail. Interestingly, I was able to ALTER the stored procedure without encountering any errors. (Perhaps because some combinations of parameters wouldn't result in a failure?)
Anyways, at the end of the day it was faulty coding in my sproc that was causing the fields in SSRS not to refresh. When I went back and corrected the issues with my code, everything worked as expected in VS.
Upvotes: 1
Reputation: 1460
I was trying to use an ODBC driver for the datasource that connected ok, but wouldn't show Fields in VS 2015 SSRS report. I went back and used a datasource based on SQL Server driver (it's in the choices when designing a datasource) and it worked perfectly.
Upvotes: 0
Reputation: 11
Had the same issue and I was able to resolve it by renaming my dataset in properties, creating a new dataset with the original name, and then hitting the refresh button.
Upvotes: 1
Reputation: 21
ok, this maybe an older thread, but I kept running into the same problem on occasion. The absolutely easiest way to fix this is adding the following line of code to the beginning of the stored procedure that produces your dataset for the report:
SET FMTONLY OFF;
Happy coding :)
Upvotes: 2
Reputation: 31
Go into your solution folder, where the rdl's are stored and delete .rdl.data file for your report. Next time you'll run the report, new rdl.data file will be created and it will have all the new fields from the updated SP.
Upvotes: 3
Reputation: 2784
I am having exact same issue in VS 2012. The stored procedure used as a query will not allow to refresh fields. When the button is pressed nothing happens.
The only solution I found is to flip the Query Type to Text and provide the parameter values on the exec
call to the SP.
Why do we have to put up with these obvious show stopper bugs?
Upvotes: 1
Reputation: 41
I had the same issue. I installed SP1 so that .rdl.data file would get generated which inturn also fixed the data refresh issue.
Upvotes: 0
Reputation: 1466
I ran into a very similar issue:
This didn't work for me so eventually I opened the particular report file [filename].rdl in a text editor and surprise surprise it was XML. It was easy enough to add the missing field manually, and visual studio then prompted me to refresh the report.
<DataSets>
<DataSet Name="DataSet1">
...
<Fields>
<!-- add new field at this level -->
<Field Name="[newfield]">
<DataField>Email</DataField>
<rd:TypeName>System.String</rd:TypeName>
</Field>
</Fields>
</DataSet>
</DataSets>
Upvotes: 1
Reputation: 3299
Just found it... I don't understand the need for hidden menus like this..
Click the report itself, then go up to View on the menu and at the very bottom there is "Report Data". From here you can select your dataset and go to its properties and refresh the reports attached dataset's fields. What a pain in the butt.
Here is a link that helps better explain it. http://blog.dontpaniclabs.com/post/2012/01/26/Developings-Reports-for-SQL-Server-Reporting-Services
Upvotes: 19