cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal reports 2020 : The document could not be opened

SDE-K
Explorer
914

Hello,

With Crystal reports 2020, last update (but I'vee had the problem since many months), I can't open some rpt files.

azsebkardol_0-1732210896714.png

 

1- I open a working report.
2- I make changes.
3- I save and close.
4- The file works well in its environment.
5- I re-open the report: the action is impossible :

azsebkardol_1-1732211056375.png

To unblock the problem, I open the file with Crystal reports 2013 :

azsebkardol_2-1732211104342.png

I re-save the document, without modification.
Then I can open with my Crystal reports 2020, modify, save, close and reopen.

There is no particular functionality in the report.
The export of the report definition with CR 2020 and CR 2013 are identical.

The problem seems random.

Do you know why?

Thank you.

 

 

 

View Entire Topic
DonWilliams
Active Contributor
0 Kudos

Hello,

The likely cause is something has changed/been updated in the RPT file itself that CR 2020 doesn't know how to resolve.

This can be caused by the differences between versions, R&D does update the internal structure of the RPT file from time to time, expanding area's with enhanced details etc.

When opening a report there is an import routine that happens each time, the EXE reads the history and depending on what info it gets depend on what it does.

For example here's the SDK reading the history of the report:

DonWilliams_0-1732365067932.png

What you are doing is updating that history when saving in CR 2020, then opening in CR 2013 and resaving it.

It is "cleaning" up the RPT file so it's import routine knows what to do with it now in CR 2020.

FYI - here's a KBA on this error:

https://userapps.support.sap.com/sap/support/knowledge/en/2914156

If you want send me a link to download one of your reports, I'll have a look at it and see if I can duplicate the issue, if I can I'll pass it onto SAP R&D to have a look at it. And open it in my main test app and do some checks to see if it catches anything.

Do your reports have Saved data when you save them? It could be Database Client related possibly.

When you do open the reports in CR 2020 Click on Database menu, Verify Database and then save the reports, that may fix the issue. Verify Database does more than just the database info, it does check a few other things as well.

What is your data source cleint, ODBC, OLE DB, JDBC, Etc.?

Unfortunately there is no sure way to "fix" this, especially when it seems to be random.

SDE-K
Explorer
0 Kudos

Thanks for informations. 

I have send a private message to you.

DonWilliams
Active Contributor
0 Kudos

Got the reports... Thank you

I know why but I can't explain why sometimes they seem to work.

Also noted is the report history is current versions of CRD, it's not the original report or they are so old there is no history:

DonWilliams_0-1732728683334.png

The first error is:

@txtpckdes : Used: 0 times'End'
Error in formula :
... text removed for privacy ....
UFL 'u2ltext' that implements this function is missing.

That UFL was one used in CR 7 and was located in c:\windows\Crystal. CR updated the UFL text functions and built them into the Designer so the UFL was no longer used/needed nor was it installed with later versions of CR or higher.

Customer needs to fix their reports and delete the Formula fields that used them. note it's not used so if they are not using the formula then delete them.

The next error is in a current UFL:

NOTE: You and I may get this error because we don't have the UFL the customer is using so when we view the report it will cause errors.

If they go into the Formula Editor and expand this they can see what the UFL name is:

DonWilliams_1-1732729509211.png

The next error is likely due to we don't have the U212 UFL either.

@INTITULES : Used: 0 times'End'
Error in formula :... text removed for privacy ....
UFL 'u212itext.dll' that implements this function is missing.

Same as above, fix or delete the formula.

There are others so no need to list them here, likely the customer needs to fix the reports.

And as you noted there are references to Database fields that do not exist:

@Codbardivpren : Used: 0 times'End'
Error in formula :
... text removed for privacy ....
This field name is not known.
Details: errorKind

Typical because the DBA may have modified the Tables used and deleted them. CR keeps a copy of the fields used in the Reports at the time of creation.

Same can happen if they add fields to the DB.

So once again the owners of the reports needs to fix them by clicking on each formula and then the X+2 button to verify the formula. It will either error indicating the field is not found or a Field Mapping UI will pop up for the user to repoint the offending field and they are able to redirect it to a new field.

And as noted for the UFL if the formula is not required then just delete the formula.

There is no button you can you do to fix them all at once, someone is going to have to open each report and fix them manually.

You can explain to the Customer that CR Designer is a design tool so it does allow Report Designers to save "bad" references. For example the designer was half way through a formula and it was time to go home so they just saved the report intending to "fix" it later, but then forgot to...

Same with the database updates, likely someone never told them they can't update the Database without updating the Reports by clicking Database... Verify Database. It's the nature of CRD, CRD always "assumes" when the reports are saved they are 100% accurate....

To sum up:

Have the customer check their reports and UFL's used, if the Formulae fields are not used then delete them. Be sure to back up all Report first just in case.

Check with their DBA to verify those missing fields are removed and/or it's possible for security reasons, CRD fully supports DB security, if the User running the reports does not have specific permissions to view the report accessing restricted tables they will get a Database error.

Hope that helps.

Don

pmo_travelcue
Explorer
0 Kudos
This definitely is a issue with Patch 8. I open a report in 2020 did verify database and then proceeded to make changes and do a final save and it gave the same error when trying to open again. Looks like will need to rollback to an earlier patch version
DonWilliams
Active Contributor
0 Kudos

I've been supporting Crystal for 25+ years but You obviously know about crystal reports than I do so if you figure that's your solution then good luck. They need to fix their reports... Good Luck

SDE-K
Explorer
0 Kudos

Hello.

I also have a long history with CR and the 2020 version is a step backwards. Several bugs that didn't exist before. No useful evolution. I don't recommend it at the moment. 
@DON : I don't think local functions are the problem. 
I downgrade a patch version a few days ago so I have anothers bugs. Time will tell if my report get stuck again on opening.

Thank you.

SDE-K
Explorer
0 Kudos