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

Access Violation in BeforeGenerate

edited April 2012 in RAP
I am stumped with a problem involving an Access Violation.

I have a bunch of RAP code in the BeforeGenerate event. I have two
integer fields in the datapipeline, and when I access one of these
fields in an IF statement, it appears to work fine, but if I change the
name of the field to the second field name, I get an access violation.
I have looked hard to make sure I have the right field name, no typos,
etc. I can't figure it out.

Also, if I put the field name that works, when I run it on another
dataset, I get an access violation there.

Is there something in the data that can cause an Access Violation?
What do I look for?

--

Comments

  • edited April 2012
    More info:

    This project is using RB 14.03 Build 63 with Delphi 2007.

    The statement is a simple IF statement like the following:

    If (Loans['TimesRenewed'] = 0) then ...

    When I change 'TimesRenewed' to 'TimesPdDwn' I get the Access Violation.

    The TimesRenewed field is mostly null values. The TimesPdDwn has more
    values ranging from null and 1 to something like 24.


  • edited April 2012
    NEVERMIND! I'm an idiot.

    The problem was in the else statement. The data for the one field
    caused it never to execute the else statement whereas the other data
    caused it to go to the else statement. In that else statement, I was
    referencing a TppVariable and forgot to add the .Value on the end of
    the name of that variable. Sorry to waste everyone's time on this. One
    of those times when tunnel vision took over and I couldn't see the
    forest from the trees.

    --
This discussion has been closed.