Mega Search
23.2 Million


Sign Up

Make a donation  
Rave Reports 10.0 with Delphi XE2 and access violation [Edit  
News Group: embarcadero.public.delphi.thirdpartytools.ravereports

Hello,
i have run into following problem with Rave Reports when i imported an old project from Delphi 2007 to Delphi XE2.

When i call RPDev.PrintDialog(PrtRec) then i get an access violation.

The problem can be simple reproduced with a small examble.

Create with the Rave designer a new report without anything inside and save it somewhere.

Create a new VCL application and drop a TRvProject and TRvSystem components on the main form. Connect the TRvProject with the System property to the TRvSystem component. Connect your TRvProject component with the report created before.
Put a button and on the OnClick event of the button write the following source code:

procedure TForm1.Button1Click(Sender: TObject);
var PrtRec:TPrintDialogRec;
begin
    if RPDev <> nil then
    begin
        PrtRec.Collate:=false;
        PrtRec.FromPage:=1;
        PrtRec.ToPage:= 1;
        PrtRec.MinPage:=1;
        PrtRec.MaxPage:=9999;
        PrtRec.Copies:=1;
        PrtRec.Options:=[poPageNums, poWarning];
        PrtRec.PrintRange:=prAllPages;
        if RPDev.PrintDialog(PrtRec) then   // HIER CRASHES!!!!!!
        begin
            // other code...
        end;
    end;
end;

The program at me crashes with an access violation in RPDev.PrintDialog(PrtRec).

I am using a Germal Delphi on Windows 7 win32.

Has anyone seen the problem and there is a workaround for this?
Is maybe something wrong on my code ?

Thanks in advance
Kostas

Edited by: Konstantinos Tournavitis on Dec 19, 2011 4:19 AM

Edited by: Konstantinos Tournavitis on Dec 19, 2011 4:21 AM

Edited by: Konstantinos Tournavitis on Dec 19, 2011 4:34 AM

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 19-Dec-2011, at 8:36 AM EST
From: Konstantinos Tournavitis