Albert
Albert

Reputation: 3689

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

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?

Upvotes: 2

Views: 27930

Answers (13)

ObjectiveSQL
ObjectiveSQL

Reputation: 1

I had this issue again today. I was able to clear it by unchecking "save with data", saving, then rechecking the box. This was in Crystal Reports editor, not in Visual Studio.

Upvotes: 0

Axel
Axel

Reputation: 402

In my case the solution was as simple as closing and reopening Visual Studio

Upvotes: 0

yakoli83
yakoli83

Reputation: 1

in my case there was a subreport with a pasted picture from a word document, that conflicted with saving the main report. after converting the picture to "Picture (Enhanced Metafile)" within the crystal report designer the main- and subreports could be saved successfully.

Upvotes: 0

fajil shaikh
fajil shaikh

Reputation: 1

Remove all data , not text field and save document . then open document and drag field from database side and save it. it works!!

Upvotes: 0

Lan
Lan

Reputation: 1361

Download this tool: R-Tag DataSource Updater for Crystal Reports. It will update the datasource for you. You can use it for 10 reports in trial mode.

Upvotes: 0

Jovani
Jovani

Reputation: 11

This could mean you have some inaccurate data variable names within your report, either a variable name has changed from your data source and no longer matches what is within the report or it no longer exists but is cached. The best way to fix would be to re create the report.

Upvotes: 0

ZahidKakar
ZahidKakar

Reputation: 212

Another easy way is to close the unsaved report by losing the changes you made and reopen the report. Then You can repeat the same changes.

Upvotes: 0

Rui Belo
Rui Belo

Reputation: 21

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.

Upvotes: 2

Austin Huddleson
Austin Huddleson

Reputation: 13

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.

Upvotes: 1

Dan Sinha
Dan Sinha

Reputation: 81

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.

Upvotes: 8

Riries - Jakarta
Riries - Jakarta

Reputation: 9

I had the same problem.

Keep trying. After succesfully change the new datasource.

  1. Map the table (on "Set Location" menu) one by one. Not propagate all tables.
  2. Then "Verify Database", then
  3. move on "Show SQL Query...". Click reset button to renew the query.

Repeat this 3 step above to map another table.

This worked for me.

Upvotes: 0

guest
guest

Reputation: 31

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

Upvotes: 3

Albert
Albert

Reputation: 3689

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.

Upvotes: 2

Related Questions