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

Access violation during stop report previewing for large records

edited April 2006 in General
how do i stop the report during previewing a large records? am i missing
something? my report is previewed and archieve at the same time. my coding
is somewat similar to below.?before the report is loaded fully, i close my
form. Access violation is encountered.

previewing ....
ppviewer1.report := ppreport;

if not assigned(FArchiveDevice) then
FArchiveDevice := TppArchiveDevice.Create(Panel1);
FArchiveDevice.Publisher := aReport.Publisher;

//temporary file used to pass to archivereader
ArcFileV := TPDTempFile.Create('raf');
FArchiveDevice.FileName := ArcFileV.FileName;

if (aPageRequest <> nil) then
FArchiveDevice.PageRequest := aPageRequest;

ppReport.printtodevices;



destructor TfrmPreview.Destroy;
begin
ppReport.DataTraversalCompleted;
ppReport.Publisher.EndJob;
ppReport.Reset;
ppReport.Free;

FArchiveDevice.FileName := '';
ppViewer1.Report := nil;

ppArchiveReader1.ArchiveFileName := '';
FreeAndNil(ppArchiveReader1);
FreeAndNil(ppViewer1);

if Assigned(ArcFileV) then
FreeAndNil(ArcFileV);
end;



--- posted by geoForum on http://delphi.newswhat.com

Comments

  • edited April 2006
    Hi Shirlene,

    Which version of ReportBuilder are you currently using? We had an issue
    similar to this one for some versions of RB 9. If you have not already, I
    would suggest updating your version of ReportBuilder to 9.03 or higher.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited April 2006
    Hi Nico,
    Thanks for replying. I'm actually "still" using RB7.04. :( We are unable
    to upgrade at the moment for other reasons.


    I
    ..
    missing
    coding
    my



    --- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.