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?
apellewAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

SpykairCommented:
After you replaced REPORTDATA, have you "Verify Database" ?

Spykair
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

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 ReinhardtSr. Business Intelligence Consultant/ArchitectCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.