sorry
我用的是RM
TRMPictureView要改成fastreport中的类
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, FR_Class;
type
TForm1 = class(TForm)
frReport1: TfrReport;
Button1: TButton;
procedure frReport1BeforePrint(Memo: TStringList;
View: TfrView);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.frReport1BeforePrint(Memo: TStringList;
View: TfrView);
begin
if View.Name = 'Picture1' then
begin
TFRPictureView(View).Picture.Bitmap.LoadFromfile('C:/1.BMP');
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
frReport1.ShowReport;
end;
end.