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

How to load reports

edited August 2005 in End User
?In my application i need to load the reports at runtime not from the
report builder but through a menu option.I don't have to use report
explorer because in this i am not able to pass parameterised query.I have
tried this code but it is not working .What is the method to do above.

fname:string;
if dlgOpen.Execute then
begin
fname:=dlgOpen.FileName;
frmLocation.ppReport1.ArchiveFileName:=fname;
frmLocation.ppReport1.Print;

end;

thanks



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

Comments

  • edited August 2005
    Hi Lucy,

    If you are trying to load an Archive file (.raf), you will need to use the
    TppArchiveReader object rather than the TppReport object.

    ppArchiveReader1.ArchiveFileName := fName;
    ppArchiveReader1.Print;

    If you are loading a template file (.rtm), you will need to assign the
    Template properties of the report before printing...

    ppReport1.Template.FileName := fName;
    ppReport1.Template.LoadFromFile;
    ppReport1.Print;

    --
    Regards,

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

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited September 2005
    thanks a lot for your help.



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