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

Problem with SaveToStream

edited June 2002 in General
Hello I've got a problem with this code

procedure TForm1.Button1Click(Sender: TObject);
var testtstream :TStream;
begin
testtstream := TStream.create;
ppdesigner1.CurrentReport.Template.SaveToStream(testtstream); //ERROR
testtstream.Free;

end;

procedure TForm1.Button2Click(Sender: TObject);
begin
ppdesigner1.Show;
end;


can you help me please thanks

Comments

  • edited June 2002
    TStream is an abstract class. You need to use a descendant, such as
    TMemoryStream or TFileStream.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited June 2002
    Daniel:

    Alexander is correct. In the future, you may want to include what your
    exceptions are, as it may help in understanding the bug. In this case, it
    was obvious it was an abstract error.

    Ed Dressel
    Team DM
This discussion has been closed.