Link to home
Start Free TrialLog in
Avatar of jyx
jyx

asked on

Dr. Watson appeared

When I tried to add a fomula field to crystal report, "Dr. Watson for Windows NT" appeared and the msg was "An application error log is being generated. crw32.exe Exception: access violation (0x0000005), Address: 0x005c307d". How to fix this problem?
ASKER CERTIFIED SOLUTION
Avatar of DRRYAN3
DRRYAN3

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jyx
jyx

ASKER

If I delete that formula field, the report can work well. however I need that field.
Avatar of jyx

ASKER

I tried to open that report on my other computer (using crystal report 8.5) and preview it, there is no error at all.
The fact that you can open it on another PC points to the DLLs installed on the problem computer.  Reinstall Crystal Reports or your app as described above.

DRRYAN3
Or copy the DLL's from the good machine.
Avatar of jyx

ASKER

I tried to open that report on my other computer (using crystal report 8.5) and preview it, there is no error at all.
Avatar of jyx

ASKER

Maybe I can not just copy the dll file from the good machine, because it is different version, one is crystal 8.5, the other is crystal 5.
The error happened when in design mode I want to preview the report.
You've probably used a feature in your report which is not available in Crystal 5.  It is generally not a good idea to mix versions that far apart.  Crystal 8 supports the Crystal 7 file format but does an automatic conversion of older formats if possible when you open them.
Avatar of jyx

ASKER

I tried to open the report using my coworker's machine (using crystal 5). No error! So maybe I should just reinstall my crystal 5.
Sounds like that may fix it.
Avatar of jyx

ASKER

Sorry! I made a mistake. My coworkers' machine is crystal 7. So that means my report can work on crystal 7 or 8, but not on crystal 5.
It seems something is wrong when I use "ToText" function in my formula using crystal 5. I'm trying to find out what is the reason.
Thanks if anyone is interested in helping me to find out the problem.

The formula which cause the error is:

"$" + ToText(Round({@LyHDQOwnedRetail}),0) + " / $" + ToText(Round({@LyHDQTicketRetail}),0)

The formula of @LyHDQOwnedRetail is:

NumberVar varLyHDQOwnedRetail;

If {spGetData.Period} = {@CurrentPeriod} And {spGetData.Week} = {@CurrentWeek} Then
  If {spGetData.LyHDQSalesUnits} <> 0 Then
    varLyHDQOwnedRetail:=  {spGetData.LyHDQOwnedRetailDollars} / {spGetData.LyHDQSalesUnits}
  Else
    varLyHDQOwnedRetail:=0;
varLyHDQOwnedRetail

The formula of @LyHDQTicketRetail is:

NumberVar varLyHDQTicketRetail;

If {spGetData.Period} = {@CurrentPeriod} And {spGetData.Week} = {@CurrentWeek} Then
  If {spGetData.LyHDQSalesUnits} <> 0 Then
    varLyHDQTicketRetail:=  {spGetData.LyHDQTicketRetailDollars} / {spGetData.LyHDQSalesUnits}
  Else
    varLyHDQTicketRetail:=0;
varLyHDQTicketRetail
I don't have CR version 5.0

Check the syntax of the ToText() function in your CR 5.0 documentation.  The underlying formulas should not be the source of your problem if you have placed them in other parts of your report and no errors are reported.