String trouble in Rave Reports 8

Posted by Jørn E. Angeltveit on Stack Overflow See other posts from Stack Overflow or by Jørn E. Angeltveit
Published on 2010-06-02T00:28:18Z Indexed on 2010/06/02 0:33 UTC
Read the original article Hit count: 477

Filed under:
|

We are currently working with Delphi 2006, but we are now very ready to move on to Delphi 2010.

The problem lies in our Rave reports, though...

We just get to many string errors when running our reports with Rave 8. And they just don't make any sense. (The reports compile with no error, and we can even run them without any error in Rave 6.)

For instance:

//This event causes access violation (in rtl14.bpl) at run time
{ Event for Page1.OnBeforeReport }
function Page1_OnBeforeReport(Self: TRavePage);
var
  s: String;
begin
  s := 'My text in param';
  s := s + ' and som more text';
  s := copy(s,1,length(s)) + ' and then some more';
  RaveProject.SetParam('MyTestParam', s);
end OnBeforeReport;


//This event works OK
{ Event for Page1.OnBeforeReport }
function Page1_OnBeforeReport(Self: TRavePage);
var
  s: String;
begin
  s := 'My text in param';
  s := s + ' and som more text';
  s := copy(s,1,length(s));  // + ' and then some more';
  RaveProject.SetParam('MyTestParam', s);
end OnBeforeReport;


//This event works OK too
{ Event for Page1.OnBeforeReport }
function Page1_OnBeforeReport(Self: TRavePage);
var
  s: String;
begin
  s := 'My text in param';
  s := s + ' and som more text';
  s := copy(s,1,length(s)) + s;
  RaveProject.SetParam('MyTestParam', s);
end OnBeforeReport;

We really want to stick to Rave, because we have a lot of reports (150+) with a lot of functionality (sql statements, events etc). Besides, we have customers who have designed their own custom reports as well.

Does anybody know the reason for these errors?
Is there any solution or workaround to these problems?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about rave-reports