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

D6.03+10.09+ArchiveReader+Print = AV

edited July 2009 in General
The following code generates an AV in my applications:

with ppArchiveReader1 do begin
Reset;
TArchivioReport.savetofile(tmpfilename);
ArchiveFilename:=tmpfilename;
devicetype:=dtPrinter;
ShowPrintDialog:=true;
Print;
end;

the code is meant to read a report from an archive and send it to the
predefined printer.
What's wrong?
Any workaround?

Thanks
Sandra

Comments

  • edited July 2009
    Hi Sandra,

    For future reference, please use your name in the 'from' field when posting
    to these newsgroups.

    This is not a known issue for RB 10.09.
    At what point in the code below does the AV occur? If you set your library
    path to \RBuilder\Source\... are you able to trace into the RB source and
    see where the error is occuring?

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited July 2009
    Dear Nico, thanks for your response.


    done! :)


    i've done it and the stop point is in ppclass.pas

    function TppCustomReport.GetAbsolutePageCount: Longint;
    begin
    Result := Engine.AbsolutePageCount;
    end;

    Thanks
    Sandra
  • edited July 2009
    Ok, i've found that the problem was in my code. Since i use a custom
    "canceldialog" form with a progressbar, the progress was calculated, also in
    case of an archived report, using absolutepageno/absolutepagecount, instead
    of archivepageno/archivepagecount. Calling absolutepagecount together with
    tpparchivereader generated the AV. Now that i've corrected the code
    everything works.

    Regards, Sandra
  • edited July 2009
    Great! glad you got it sorted.

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.