var
t: TfrbandView;
begin
t := TfrbandView(frReport1.FindObject('masterdata1'));
if t <> nil then begin showmessage('123');
t.Script.Add('memo1.memo:="123"');end;
测试通过
Page := frReport1.Pages[1];
b := TfrBandView.Create; // create Title band
b.SetBounds(0,88,757,20); // position and size in pixels
b.BandType := btReportTitle; // (only Top and Height are significant
Page.Objects.Add(b);
// for the band)
b := TfrBandView.Create; // create Title band
b.SetBounds(0,112,757,20); // position and size in pixels
b.BandType := btpageheader; // (only Top and Height are significant
Page.Objects.Add(b);
v := TfrMemoView.Create; // create memo
v.SetBounds(280, 20, 112, 20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw');
Page.Objects.Add(v);
v := TfrMemoView.Create; // create memo
v.SetBounds(220,64,96,20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw1');
Page.Objects.Add(v);
v := TfrpictureView.Create; // create memo
v.SetBounds(352,68,96,20);
//v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Name:='zz';
//v.Memo.Add('Your text is: zw1');
Page.Objects.Add(v);
v := TfrMemoView.Create; // create memo
v.SetBounds(260,88,96,20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw2');
Page.Objects.Add(v);
v := TfrMemoView.Create; // create memo
v.SetBounds(236, 112, 112, 20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw3');
Page.Objects.Add(v);
Page := frReport1.Pages[1];
b := TfrBandView.Create; // create Title band
b.SetBounds(0,88,757,20); // position and size in pixels
b.BandType := btReportTitle; // (only Top and Height are significant
Page.Objects.Add(b);
// for the band)
b := TfrBandView.Create; // create Title band
b.SetBounds(0,112,757,20); // position and size in pixels
b.BandType := btpageheader; // (only Top and Height are significant
Page.Objects.Add(b);
v := TfrMemoView.Create; // create memo
v.SetBounds(280, 20, 112, 20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw');
Page.Objects.Add(v);
v := TfrMemoView.Create; // create memo
v.SetBounds(220,64,96,20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw1');
Page.Objects.Add(v);
v := TfrpictureView.Create; // create memo
v.SetBounds(352,68,96,20);
//v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Name:='zz';
//v.Memo.Add('Your text is: zw1');
Page.Objects.Add(v);
v := TfrMemoView.Create; // create memo
v.SetBounds(260,88,96,20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw2');
Page.Objects.Add(v);
v := TfrMemoView.Create; // create memo
v.SetBounds(236, 112, 112, 20);
v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('Your text is: zw3');
Page.Objects.Add(v);