[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 909
  • Last Modified:

Changes to a formula not being saved on exit ...

Hi there

I'm having a problem with saving a formula in Crystal 10 (service pack 4). On opening the report I get "the saved data will be discarded since one or more formulas failed to compile". If I open the report and run it, I get to the offending formula

if IsNull ({REPORTDATA.DIARY_VERSION})
then 0
else if {TRDC.DIARY_VERSION} > 0 or
{TRDC.DIARY_VERSION} = 0
then -2
else 0

Replacing TRDC with REPORTDATA and I then Save and Close. Then I log on to the database, run the report which successfully runs. Then I close and save, or save, or save as new file. But whatever I do, when I reopen the report the formula is still wrong - I cannot get Crystal to save the report.

Am I missing something?
0
apellew
Asked:
apellew
  • 5
  • 3
  • 3
  • +1
6 Solutions
 
SpykairCommented:
After you replaced REPORTDATA, have you "Verify Database" ?

Spykair
0
 
apellewAuthor Commented:
No. Do you need to do a "Verify Database" to make sure it picks up the changes? Anyway, I'll give it a shot and get back to you ...
0
 
wykabryanCommented:
There may be other formulas that might be causing this error.  Are you able to run the report after you save it? One of the ways, that seems to work, to check error in the entire report is to do a verify database.  You may need to do this several time to find all of the error.  
In your formula try something like this to help streamline it a bit more:

if IsNull ({REPORTDATA.DIARY_VERSION})
  then 0
  else if {TRDC.DIARY_VERSION} >= 0
           then -2
           else 0
0
Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

 
apellewAuthor Commented:
The problem is that I'm opening the report, seeing the error, fixing it then running the report to make sure it works. Saving it, shutting down crystal, re-opening crystal and loading it and seeing exactly the same error as if nothing had changed.
0
 
wykabryanCommented:
You mention in your original post that you changed from TRDC to REPORTDATA, does that mean you alias the table off?  If you are using REPORTDATA, is it being consistantly applied through out the report.  What is the complete error that you are receiving?

Thanks,
0
 
SpykairCommented:
Is "Save Data to Report" checked ? You'll find it under File -> Save Data With Report. It shouldn't be.

Spykair.
0
 
apellewAuthor Commented:
wykabryan >

Yes, we've changed the alias from TRDC to REPORTDATA. It (REPORTDATA) is being used consistently throughout the report except for this one formula which is showing the error.

Spykair >

Sorry but we need that checked as the report will actually be run by the End-USers from our User Application (written in DElphi, using the Crystal 10 vcl) and the VCL errors if the report does not have any data with it. At the moment though we're seeing problems in the designer so havn't got that far yet!
0
 
wykabryanCommented:
Is there a reason why it is not the same in the formula. This is the problem, provide there is not another table called TRDC.


if IsNull ({REPORTDATA.DIARY_VERSION})
  then 0
  else if {REPORTDATA.DIARY_VERSION} >= 0
           then -2
           else 0
0
 
apellewAuthor Commented:
No, actually that's exactly what it should be and what I change it too ... but it doesn't seem to save correctly (i.e. when I re-open the report the error is still there and the changes I've made are discarded).

I've had some other problems with Crystal 10 (relating to Oracle databases) and was wondering if this is a problem that is widely know.

I'll run a verify database (as soon as I've installed Oracle 10g locally on my machine ... long story).

Cheers!
0
 
Kurt ReinhardtCommented:
Do you have a group with Specified Sort Ordre?  I've seen this issue with reports that we've customized that use Specified Sort Order.

~Kurt
0
 
apellewAuthor Commented:
I have split the points for this question to everyone who helped ... all the things mentioned were good to check, but it looks like the problem is more likly due to the way we are using Crystal (embedded in a Delphi client, calling Oracle 9i2 stored procedures via a Oracle 8 connector, etc). In short; thanks everyone, I've got a lot of things to look at now!
0
 
SpykairCommented:
Glad I could help.

Spykair
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 5
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now