Crystal Reports: "Failed to Save Document" after changing Datasource

22,335

Solution 1

Yeesh, like so many others who encounter this problem, there was no fix except to recreate the report from scratch.

I'm sorry to report that, but thems the facts. Gotta love Crystal Reports' error messages and their complete and utter lack of any details.

Solution 2

I had success using the following steps.

  1. Change the datasource location as usual. At this point trying to save results in the helpful "Failed to save." error.
  2. Select everything on the report and delete it all. (Except for subreports or anything you can't get back using undo.)
  3. With any luck, you will now be able to save. If you can't try doing this inside your subreports.
  4. Undo your deletions and save again.

You can track down the source of the problem by changing the datasource table by table and trying to save after each change. I found that my problem lay in a subreport's table, and applied the above steps inside that subreport to fix the problem.

Solution 3

I had this issue when I added some formula fields. I removed the fields and was able to save again.

Solution 4

For me the solution was very simple:

In Database menu, "Set Datasource Location" option, then in the properties of the database table there is an option called "Overridden Qualified Table Name" (I think is the name in English because I'm using a version of Crystal Reports XI in Portuguese but I found in the Internet the equivalent terms in English).

I just wrote there the name of the table and I was able to save again without the "Failed to Save Document" error, so anyone thinking of recreating entirely the report from scratch should try this first.

Solution 5

I had the same problem. I used the Dependency checker which can be found under on the top under Report -> Dependency checker to resolve all invalid database references.

Then I saved all the sub report outside of my main report, and then deleted them from my main report. At this point i was finally able to save the main report.

Then I inserted the sub reports back into my main report one at time time.

Share:
22,335
Albert
Author by

Albert

Updated on July 09, 2022

Comments

  • Albert
    Albert almost 2 years

    I have about 15 .RPT files on my .NET 2.0 site, and I recently changed to a new database server.

    I successfully changed the Datasource on 14 of those .RPT files, but on one, after making the change, I get "Failed to Save Document" when I try to save the updated report. I can change the subreport's Datasource, and save it just fine, but when I try to change the main report's Datasource I get that error message.

    I'm definitely doing a "Verify Database" at various times throughout the process, but that doesn't seem to help.

    Any ideas?

    • Albert
      Albert about 14 years
      update - if i remove the Grouping it saves just fine...
  • patrickbadley
    patrickbadley almost 11 years
    This was essentially my solution. I encountered this error after moving fields out of a sub report into the main report and the fields did not map to the datasource in the main report causing this error. Delete these fields and re-add them from the field explorer. You still need to redo some work but its better than restarting from scratch.
  • Golden Lion
    Golden Lion about 2 years
    I had to close the report then open it again and rebuild the missing pieces