0
votes

I have an application that uses Rave Reports.

After upgrading from Delphi 2006 to Delphi 2010 some scripts stopped working and gives an Access violation message

I have a script that looks like this:

OnGetText:

 IF  (ddvDetailTaxidEventType.AsInteger = 1)  THEN
    Value := 'TEST ' + ddvDetailTaxidEventType.AsString ; 
ELSE
     Value := 'TEST ';  
 END IF;

This script works in Rave 6.5BE(D2006) but not Rave 7.7BE (D2010)

Note:

Command : Value := 'TEST ' + ddvDetailTaxidEventType.AsString ;

works without the If and EndIf statements.

Command : Value := 'TEST ';

works without the If and EndIf statements.

Command : if (ddvDetailTaxidEventType.AsInteger = 1) THEN

Gives the Access violation message

Command : if (ddvDetailTaxidEventType.AsString = ‘1’) THEN

Gives the Access violation message

I just don’t see where I am going wrong…

please help.

1
@Charles: "gives an Access violation message" doesn't tell anyone anything. What is the exact error message (including addresses) of the AV? You need to provide useful information if you want to receive useful answers.Ken White

1 Answers

0
votes

Method AsInteger causes application's AV in rave 7.7. (AsString works fine)

replace it with: if (ddvDetailTaxidEventType.AsString = '1') then

https://forums.codegear.com/thread.jspa?threadID=31157&tstart=0