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

TBitmap into a report

edited April 2003 in General


Hello!

I try to send in a TBitmap to a Report.

In the report I try:
var
MyBitMap : TBitmap;
begin
....
....

ppImage1.Picture.Bitmap.Assign(MyBitmap);

I get that I can't assign a TBitmap to a TBitmap.


How Can I do this?

Comments

  • edited April 2003
    Works fine here. My code is a bit different:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
    ppImage1.Picture.Assign(Image1.Picture);
    ppReport1.Print;
    end;

    I just dropped a TImage, TButton and a TppReport on a form and a TppImage on
    the report. Loaded a image into the TImage and it worked.

    What is happening with your app? (You obviously didn't post all the code).

    --
    Ed Dressel
    Team DM
  • edited April 2003
    Hi Magnus,

    check your uses clauses. 'Graphics' should be placed after Windows, both declares 'TBitmap'.
    TBitmap doesn't override the 'Assign' methods, you have to use 'TPicture.Assign' as Ed already mentioned.

    regards,
    Chris Ueberall;
This discussion has been closed.