Changes don't get saved in Crystal Reports rep

2019-08-04 01:24发布

问题:

I've started using Crystal Reports recently. Have been able to create a report and mostly done with it. But suddenly I started to lose any change made inside a textbox object. I edit a textbox, save the report and close it. And then I reopen it to see that the change hasn't remained. I restart the Visual Studio and even the machine but nothing helps. I use VS 2012. Has anyone experienced anything like this?

回答1:

In the report preview see if the checkbox "Save data in the report" is checked. If so, try unckecking this checkbox. It is causing me some trouble to save the report crashing Visual Studio interface.



回答2:

In fact I found the reason for the problem. This happens when I try to save the changes while the focus is on the edited object, in this case textbox. But if I click somewhere else (in order to lose focus on the edited textbox) before saving, then the problem gets solved. Happy to have found it.



回答3:

Welcome to the club :)

Crystal Reports can behave very strangely in some cases. For instance, some times when i edit a report file in Windows XP, it crashes the interface and corrupts the file when i save it. The same problem doesn't appear in Windows 7. However other strange things happen in Windows 7 also.

I would recommend you to

  1. Always apply the latest Service Pack available for the Crystal Reports Engine.
  2. Always check if the asterisk sign disappears from the opened report file when you save it (some times it doesn't when you hit save and it does when you hit save all and vice versa).
  3. Always backup your report files once in a while because to recover a corrupted file is a very hard task.

You can try the following to find out what causes the problem

  1. Create a new blank Windows Forms project, add the same report file there and check if it behaves the same.
  2. Create a new blank report file and check if a change in a field behaves the same way after saving it.
  3. Try it on another OS.


回答4:

Go to Database | Verify Database and make sure the database is up to date.

Also Go to Database | Show SQL Query and reset the query. Now enter in the Selection Formula again and save.

Updating the SQL will replace the Selection Formula.

Good luck,