???自带的Demos里面不是有一个例子嘛。runtime下面那个工程,仔细看看就了解了。procedure TForm1.Button1Click(Sender: TObject); var v: TfrView; b: TfrBandView; Page: TfrPage; begin frReport1.Pages.Clear; frReport1.Pages.Add; // create page Page := frReport1.Pages[0]; b := TfrBandView.Create; // create Title band b.SetBounds(0, 20, 0, 20); // position and size in pixels b.BandType := btReportTitle; // (only Top and Height are significant Page.Objects.Add(b); // for the band) v := TfrMemoView.Create; // create memo v.SetBounds(20, 20, 200, 16); v.BandAlign := baWidth; v.Prop['Alignment'] := frtaCenter; // another way to access properties v.Prop['Font.Style'] := 2; v.Memo.Add('Your text is: [Edit1.Text]'); Page.Objects.Add(v); .... end;
用frReport1.showreport就可以显示。
var
v: TfrView;
b: TfrBandView;
Page: TfrPage;
begin
frReport1.Pages.Clear;
frReport1.Pages.Add; // create page
Page := frReport1.Pages[0]; b := TfrBandView.Create; // create Title band
b.SetBounds(0, 20, 0, 20); // position and size in pixels
b.BandType := btReportTitle; // (only Top and Height are significant
Page.Objects.Add(b); // for the band) v := TfrMemoView.Create; // create memo
v.SetBounds(20, 20, 200, 16);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: [Edit1.Text]');
Page.Objects.Add(v); ....
end;