Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update DataSet Schema On Crystal Reports for VS2008

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).

like image 914
Hallaghan Avatar asked Feb 26 '23 03:02

Hallaghan


1 Answers

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.

like image 156
Hallaghan Avatar answered May 07 '23 05:05

Hallaghan