Skip to Content
0

crystal report export fails

Jan 03, 2017 at 09:06 AM

71

avatar image
Former Member

I've got some reports that somehow contain old (not up to date) where clauses. These reports originate from version 8.5 (or lower). When trying to execute (Export) these reports, an error results. When I fix these reports in Crystal Reports X! using the reset button,in the Sql query box, the report can be exported. Is there a way to fix these reports through tje API? I'm using Crystal Decisions Runtime to run the reports in my application

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Dell Stinnett-Christy Jan 03, 2017 at 03:39 PM
0

This is a tough one for a couple of reasons:

- Crystal XI has been out of support for several years and Crystal 8.5 has been out of support for over 10 years.

- There were major changes to the internal structure of the .rpt file with Crystal 9, which is what is causing your issue. When you reset the SQL and save the report in Crystal XI, the internal format of the .rpt file is updated to the new version. You're lucky you can just reset the SQL and save - I had to recreate 150+ reports from scratch when moving from 8.5 to XI because we had manually changed the SQL in them.

Which version of the runtime are you using?

Using the Crystal XI .NET SDK or the Crystal 10 SDK that came bundled with earlier versions of MS Visual Studio, you'll be able to open the report and save it. I know you can call "Verify Database" from code, but I'm not sure how to reset the SQL from there. I have a .NET utility for documenting reports that's available on my website - http://www.dellstinnett.com/sample_code.html - look for "Code for CrystalDocumenter application". This might help you get started with a utility for this.

-Dell

Show 4 Share
10 |10000 characters needed characters left characters exceeded
Former Member

CRRuntime version CRRuntime_64bit_13_0_9.

I also tried higher versions, but the result is the same. Indeed, we are lucky not to have to recreate the reports, but as I am a lazy person, I'd rather solve this problem programmatically than by doing the same thing a hundred times. It bothers me that there seems to be no way to do it automatically. Why is there no API-method that does the same as what the reset button in Crystal does?

0
Former Member

By the way, I don't know exactly what VerifyDatabase does, but I tried that and it doesn't solve the problem mentioned earlier

0

You have a good version of the runtime. I was afraid you were using something much earlier.

I'm trying to dig into some of my old code to see whether I can come up with something that will help you.

-Dell

0
Former Member
Dell Stinnett-Christy

Thanks for your help

0
Dell Stinnett-Christy Jan 17, 2017 at 05:58 PM
0

Hi Henk,

I have not been able to find any code that will help with this. Sorry!

-Dell

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 11 at 07:27 AM
0

Hi Dell,

At least you tried: thank you!

Henk

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 11 at 07:31 AM
0

One more thing, Dell,

Is there no way to find out where this 'Reset' originates from? There must be a programmer or team of programmers that one day deemed it necessary to put the button on the screen and write code for it. You seem better situated than I am to find out who they are and what the reasons were for creating it. In the picture you'll find the text Job."JobRecStatus"= 16. This text once was a record filter, but has been removed long ago. Somehow it still appears in the query. As soon as you push the reset button, this filter is removed and the reset button will disappear. So, I would like to execute the code for all our reports (several thousands of them) without having to open them in Crystal Reports one by one.

Henk

crystal.png


crystal.png (39.0 kB)
Share
10 |10000 characters needed characters left characters exceeded