Skip to Content
avatar image
Former Member

crystal report export fails

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Jan 03, 2017 at 03:39 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 17, 2017 at 05:58 PM

    Hi Henk,

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

    -Dell

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 11 at 07:27 AM

    Hi Dell,

    At least you tried: thank you!

    Henk

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 11 at 07:31 AM

    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

    Add comment
    10|10000 characters needed characters exceeded