I have an existing report (Crystal Report) in my Visual Studio project that is based off of an SQL Server View. using an OLE DB (ADO) connection.
I've updated the View since the report was created. I've changed some field names and added a field.
How can I update the fields on the report to point at the new field names in the view?
OR
How can I add a new field to the report that points at the new field in the view?
(I know, that's two questions. But the answer is probably going to be very similar for both)
I finally figured it out. For the sake of the next guy...
shahkalpesh and serge_ bg are right about the "Verify Data"
If you right click on a blank spot on your report, you will get a popup menu. Select Database -> Verify__Database. Crystal Reports should update the fields that have changed.
You can drag-n-drop the new field onto your report.
There should be a "Field Explorer" tree view (probably on the left). Select Database Fields -> View/Table Name -> Field Name and drag that onto your report.
A worst case scenario of Crystal Reports updating report field to match up with the wrong field on the view, can be resolved by deleting the old field and re-adding the field using the drag and drop method.
"Verify database" should help you. This is the answer on both questions.
How can I add a new field to the report that points at the new field in the view?
You will have to manually add that field to the report. What do you think should be the case?
I think there is some option which sounds like "Verify Data". If you do that, it will prompt you with "some fields has changed... proceed to fix report?", I think that should take care of your first question.
Thanks to the geniuses at Microsoft who promptly thought that it might be possible to change tables and view columns, this is a piece of cake! You get that I'm being sarcastic I hope.
You're missing 1 step, that's to drop and recreate your DataAdapter
otherwise you'll go nuts trying to add the new fields into your report... then you can run the verify db option to refresh your columns...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With