Update DataSet Schema On Crystal Reports for VS2008

寵の児 提交于 2019-12-20 01:35:23

问题


I'm creating a report using the built-in module of Crystal Reports in Visual Studio 2008, and for that I have added a DataSet containing multiple DataTables. As for now, the DataTables have a certain quantity of fields which may grow in the future, so the next person updating my report will need to update the DataSet schema.

The problem is that whenever I add new fields to a Datatable, that Datatable's fields isn't updated in Crystal Reports. Every time I tried doing this I was forced to remove the DataSet completely and add it again in order to have the updated schema, which is a very bad solution because all fields already on the reports get lost.

Is there a simple way to make it update the structure? (I've already clicked Verify Database under database Expert).


回答1:


After having a conversation with a friend, we both figured out how to overcome this problem but the solution is not very elegant:

  1. Add columns to your DataTable
  2. Close Visual Studio
  3. re-open Visual Studio
  4. right click the DataTable to update
  5. click Set Datasource Location
  6. add your DataSet connection again and update your DataTable against the one present in the new connection

Note: if you try to update again, you must close visual studio again and repeat everything.

Hope this can help someone with the same problem.



来源:https://stackoverflow.com/questions/4959814/update-dataset-schema-on-crystal-reports-for-vs2008

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!