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

Read of address 00000 AV when loading template

edited January 2002 in General
Hi all

We have just installed V 6.03 Ent. as part of our upgrade path to Delphi 6.
I am currently working on changing our application's source code for Delphi
6 (not a very nice task, thanks Borland


When I open a report template in our run-time designer, I get a 'Read of
Address 00000' AV. I have traced the code (via the CPU window) down to a
call in TraCodeModule.FixupProgramReferences. There is a list which is being
iterrated through, but it returns a nil pointer. Since we don't have the
source code for the RAP stuff, I don't know why this is happening.

Can DM tell me what the list is, and under what circumstances a nil pointer
might get added to it. Bear in mind that we have a descendant control from
TppReport that handles additional data in the Template.

Also, there is a bug in ppTmplat. TppTemplate.ComputeOffsetFromStream()
calculates the offset from the current stream position. Everywhere else in
the code, the offset is calculated from the beginning of the stream. This
caught us by surprise, but the easiest work-around is for us to reset the
stream position after reading in our template data and calculating the
offset.

Cheers
Paul Grimstrup

Comments

  • edited January 2002
    Using D6, can you create a new report and load the newly created template at
    runtime?

    The current template source I'm looking at seems to be correct. It should
    skip the offset when it loads the template report object data. I suspect
    that the offset area in your template is being read from the stream as part
    of the report, which would cause an AV.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.