国
国色天香
Unregistered / Unconfirmed
GUEST, unregistred user!
源代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, RM_Common, RM_Class;
type
TForm1 = class(TForm)
Button1: TButton;
cb_1: TComboBox;
RMReport1: TRMReport;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
with RMreport1do
begin
LoadFromFile('rp1.rmf');
FindObject('mm_bt').Memo.Text:=cb_1.text+'费用清单';
ShowReport;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
cb_1.Items.Add('宝兰');
cb_1.Items.Add('宝兰中国公司');
cb_1.Items.Add('宝兰中国公司北京办');
end;
end.
我希望在下拉框中选择单位,打印出来的标题都自动居中,报表中的标题我设置了自动居中了,就是不行.
该怎么办?
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, RM_Common, RM_Class;
type
TForm1 = class(TForm)
Button1: TButton;
cb_1: TComboBox;
RMReport1: TRMReport;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
with RMreport1do
begin
LoadFromFile('rp1.rmf');
FindObject('mm_bt').Memo.Text:=cb_1.text+'费用清单';
ShowReport;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
cb_1.Items.Add('宝兰');
cb_1.Items.Add('宝兰中国公司');
cb_1.Items.Add('宝兰中国公司北京办');
end;
end.
我希望在下拉框中选择单位,打印出来的标题都自动居中,报表中的标题我设置了自动居中了,就是不行.
该怎么办?