开发者

RDLC Report Data doesn't update to reflect changes

On my RDLC page, the "Report Data" window shows a custom dataset that it pulls fields from to display. I've modified this DataSet with some additional tables. However, these tables aren't shown and therefore I'm unable to select them for use in expressions (in the Expression window, under Datasets, there are only the tables that were originally there, not the additional tables I've added).

Refreshing the data source doesn't do anything, and if I right-click on it and select "New Dataset", I'm unable to select the parent data source 开发者_如何学JAVA(it doesn't appear in the drop down list). What I mean is, if the data source is called "MyDataSet", and under that are other DataSets, if I right-click and go to "Add Dataset", it brings up the dialog box but "MyDataSet" is not in the list of available Data sources, even though I'm specifically saying I want to add a datatable to that data source. The other, existing, datatables list it under the data source, but new ones do not.

How do I refresh the data source so I can access these new tables in my report?


This is an old question, but I was having this problem too and I'll mention my answer for future googlers.

In the Report Data Window (which automatically appears for me when I am editing a .rdlc file), I had to Refresh my Dataset (same name as the DataSetName in the Tablix in my .rdlc Report), and then that updated the XML of the .rdlc file. The new fields are then available to me.


I have the same problem with Visual Studio 2010 Premium. You must do this step:

  1. Re-build the project that contain your Business Object
  2. Restart Visual Studio
  3. Refresh your DataSet (Report Data --> Right click on DataSet --> Refresh).


I managed to get this working (for SSRS in C# using a Dataset that points to a Stored Procedure) by:

  • hitting Shift+Alt+D (which opens the "Data Sources" window)
  • In Data Sources, select/click the table you want to update
  • At the top of the window there are icons (I'm using VS2012). The 2nd from the right is "Configure Data Source" - click it and it will open a new wizard window that will appear to be refreshing everything.
  • UN-check the column that is no longer applicable and/or check the new column (if the values aren't already checked/unchecked).
  • Go back to your "Report Data" window (Ctrl+Alt+D) and right-click on your Dataset and then click "Refresh".

All the columns should be updated at that point.


Have you tried rebuilding your project? I had to do this after changing any business object.


I had this issue for hours on VS-2008. Tried everything and at the end what worked was just to close and open it VS again.


I can confirm that just closing the solution and reopening it, with later refreshing the DataSet from Report Data window worked for me. Seems like there is no need to restart VS.


I got the same issue in visual studio 2012. I solved it, here is the steps,

  • Press Ctrl + Q and type Report Data (If No Report Data window available)
  • Expand Data Source node to find the data set (I have used Data Set)
  • Right click on the Data set and select Refresh (Simply refresh the data source)


Delete the dataset and again add it with ur query or usp...


If you are using a database source the likely culprit is that you didn't create the query with select *. Without the * the query will always be static and new fields won't appear. HTH


For visual studio 2010

  1. Open Your Data Set (.xsd file)
  2. Right click on data set click on configure
  3. Click on Next Next than finish
  4. On your dataset click refresh than Changes willbe display.


Sounds like same issue is happening on VS2019. I could resolve the issue by only restarting Visual Studio, nothing else worked!


This is the only solution worked for me.

After updating the DataSource properly, open the .rdlc file in NotePad and add the newly added Field manually. Then it will be available to use in the report.

RDLC Report Data doesn't update to reflect changes


Had the same in VS2019 using an object datasource, right click and refresh on the dataset in the Report Data window had no effect until I changed the build configuration from x64 to Any CPU, then it worked as expected. Once it updated changed the build back and all was well - not at all flakey!


As ChanthJ said - It is the only solution worked for me.

After updating the DataSource properly, open the .rdlc file in NotePad and add the newly added Field manually. Then it will be available to use in the report.

steps


Assuming you Data source is fed by stored procedures, the following worked for me (On Visual Studio 2017): -

  1. Make the necessary changes in the source stored procedure in the Database(new Field Names etc.).
  2. Double click the .XSD file from the Solution Explorer to open it
  3. Delete the associated Data Table / Table Adapter.
  4. Add the Table Adapter back into the .XSD file (the changes will be reflected)
  5. Save and close the .XSD
  6. Open the .rdlc report designer.
  7. Press "ctrl+Alt+D" or Click View > Report Data.
  8. Expand the Data Sources node.
  9. Right Click the Data Source.
  10. Select "Refresh".
  11. Expand the Datasets node.
  12. Right Click the Data Source.
  13. Select "Refresh"

The changes will now reflect and be available for selection on the .rdlc report designer

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜