Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Strange access violation error.

edited October 2003 in General
I'm receiving an access violation when a report is run for the second time
(using the search feature). I've isolated the offending code, but it looks
fine. It's just some floating point calculations - add, multiply, divide,
etc. There are also a couple of calls to Sqrt, Exp, and Ln, but removing
these alone still does not resolve the problem. What's really strange is
that everthing works the first time through.

I'm running Delphi 5 and Report Builder Enterprise 7.03. Here are the
offending lines of code (I've shortened the variable names for convenience.
They are all the same type - "Extended").

SD:=SD+V*V;
T:=T+V;
YTD:=100*((1+(V1/100))*(1+(V2/100))-1);
Q:=Q+Ln(1+V/100);
AA:=100*Exp(12*(AA/(P+N)))-100;
SD:=100*SQRT(12)*SQRT((SD-((AA*AA)/(N+P)))/(N+P-1));

Anyone have any ideas?

Comments

  • edited October 2003
    Sorry. Posted to General. meant to post to RAP.

  • edited October 2003
    Hi Matthew,

    I would recommend trying to break up your calculations below into a few more
    intermediate steps. In past experience, this seemed to solve many problems.
    If you are still having an issue, please send an example that shows this AV
    and I'll try to find the cause for you.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.