如何才能打印外部图片。。。急,急,急,高手。。高手。。高手。。。。(50分)

  • 主题发起人 主题发起人 zzjmail
  • 开始时间 开始时间
Z

zzjmail

Unregistered / Unconfirmed
GUEST, unregistred user!
不得已保存图片的位置,可是在打印的时候,该如何才能打印图片呢,
因为只知道位置,没有保存到数据库中。。打印使用的fastreport,和rave
急,急,急,高手。。高手。。高手。。。。
 
if View.Name = 'Picture1' then
begin
TRMPictureView(View).Picture.Bitmap.LoadFromfile.............;
end;
 
procedure TFrm.RMReport1BeforePrint(Memo: TStringList;
View: TRMView);
 
需要使用到fastreport的什么控件吗?还有当我查询出数据的时候,在浏览数据的时候,
我可以让根据数据库当前记录中保存图片位置的值的有无,来动态的显示图片在image中,
可是你这样在打印浏览的时候,可以动态的改变图片吗。。。。?
急,急,急,,
 
procedure TForm1.frReport1BeforePrint(Memo: TStringList;
View: TfrView);
begin
// if View.Name = 'Picture1' then
if View.Name = 'imagephotos' then
//例如我保存图片的位置的字段名:imagephotos
begin
TRMPictureView(View).Picture.Bitmap.LoadFromfile();
end;
end;
。。。。编译不过去呀。TRMPictureView这一句出问题呀。。
 
hfghfghfg??人呢?哪去了。。
 
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.
 
object Form1: TForm1
Left = 192
Top = 107
Width = 696
Height = 480
Caption = 'Form1'
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 326
Top = 184
Width = 75
Height = 25
Caption = 'Button1'
TabOrder = 0
OnClick = Button1Click
end
object frReport1: TfrReport
InitialZoom = pzDefault
PreviewButtons = [pbZoom, pbLoad, pbSave, pbPrint, pbFind, pbHelp, pbExit]
StoreInDFM = True
OnBeforePrint = frReport1BeforePrint
Left = 136
Top = 86
ReportForm = {
1800000042010000180000000011004550534F4E204C512D313630304B494949
00FFFFFFFFFF0900000034080000990B00000000000000000000000000000000
000000FFFF00000000FFFF000000000000000000000000030400466F726D000F
000080DC000000780000007C0100002C010000040000000200DB0000000C0052
65706F72745469746C65310002010000000054000000F5020000820000003000
000001000000000000000000FFFFFF1F00000000000000000000000000FFFF00
0000000002000000010000000000000001000000C80000001400000001000000
000000010033010000080050696374757265310002007C000000680000006000
0000520000000500000001000000000000000000FFFFFF1F2E02000000000000
0000000000FFFF0000000000020000000100000000000033010000FEFEFF0000
00000000000000000000}
end
end
 
没有意思,都没有人回答到重点
 

Similar threads

D
回复
0
查看
1K
DelphiTeacher的专栏
D
D
回复
0
查看
898
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部