1、Demo中的runtime的例子不全,哪位能给个全一点的例子如有
pageheader,pagefooter等等
2、怎么样给TfrBandView的onbeforeprint事件赋事件
就是动态的在程序中写?我没找到这个东东
msn:[email protected]
pageheader,pagefooter等等
2、怎么样给TfrBandView的onbeforeprint事件赋事件
就是动态的在程序中写?我没找到这个东东
msn:[email protected]
解决方案 »
- 如何将Oracle数据库的表转化为access
- 关于调试问题..
- 有个Delphi与SQL的问题,本人不明白为什么,感觉有点儿那个。。。。。
- 怎样获取html表格中的数据!!!顶者有分
- 100分调查各位朋友用什么软件制作setup安装文件?
- 如何获得PC机的唯一硬件特征?如何编写注册码程序,防止程序被非法流传。
- 哪位大虾知道delphi 如何操作声音文件,有无缘代码 我愿贡献20分
- 请教:我用Delphi6中Samples的ShellListView,击右键怎不弹出“资源管理器的右键菜单”?
- 这个问题已经困扰了我三天,我快支撑不住了......
- Delphi 如何调用中文名的dll
- 请教:在用QRCHART时遇到的一个小问题
- Tnmmsg和Tnmmsgserv问题
v: TfrView;
b: TfrBandView;t3:tfrlineview;
Page: TfrPage;t2:tfrpictureview;
t: TfrshapeView;t1:tfrbarcodeview;
begin
frReport1.LoadFromFile('d:\rsc\try.frf');
Page := frReport1.Pages[0];
v := TfrEditControl.Create; // create editbox
v.SetBounds(60, 50, 75, 21);
v.Name := 'Edit1';
Page.Objects.Add(v); v := TfrButtonControl.Create; // create button
v.SetBounds(60, 100, 75, 25);
TfrButtonControl(v).Button.Caption := 'Test!';
TfrButtonControl(v).Button.Font.Name:='隶书';
TfrButtonControl(v).Button.ModalResult := mrOk;
Page.Objects.Add(v); v := Tfrcheckboxcontrol.Create; // create editbox
v.SetBounds(60, 150, 115, 21);
v.Name := 'checkbox1';
Tfrcheckboxcontrol(v).CheckBox.Caption:='姓名不同是否翻页?';
Tfrcheckboxcontrol(v).CheckBox.Checked:=true;
Page.Objects.Add(v); v := Tfrradiobuttoncontrol.Create; // create editbox
v.SetBounds(250, 150, 100, 21);
v.Name := 'ra1';
Tfrradiobuttoncontrol(v).RadioButton.Checked:=true;
Page.Objects.Add(v); v := Tfrcomboboxcontrol.Create; // create editbox
v.SetBounds(60, 200, 75, 21);
v.Name := 'com1';
Tfrcomboboxcontrol(v).ComboBox.Items.Add('123');
Tfrcomboboxcontrol(v).ComboBox.Items.Add('456');
Tfrcomboboxcontrol(v).ComboBox.Style:=csDropDownList;
Tfrcomboboxcontrol(v).ComboBox.ItemIndex:=0;
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); v:=tfrshapeview.Create;
v.SetBounds(328,20,96,20);
v.Name:='shape2';
Page.Objects.Add(v); v:=tfrlineview.Create;
v.SetBounds(200,20,0,20);
v.Name:='line1';
Page.Objects.Add(v); v:=tfrbarcodeview.Create;
v.SetBounds(444,20,142,20);
v.Name:='barcode1';
Page.Objects.Add(v); v := TfrMemoView.Create; // create memo
v.SetBounds(150, 20, 96, 20);
//v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('[dialogform.query1.sfgz]');
Page.Objects.Add(v); t1:= TfrbarcodeView(frReport1.FindObject('barcode1'));
if t1<>nil then t1.Memo.clear;t1.Memo.Add('[dialogform.query1.bh]'); t2:= TfrpictureView(frReport1.FindObject('zz'));
if t2<>nil then t2.Picture.LoadFromFile('d:\rsc\normal.ico'); t:= TfrshapeView(frReport1.FindObject('shape2'));
if t<>nil then t.ShapeType:=skDiagonal1; t3:= TfrlineView(frReport1.FindObject('line1'));
if t3<>nil then t3.FrameWidth:=10; frReport1.ShowReport;
end;end.
v: TfrView;
b: TfrBandView;t3:tfrlineview;
Page: TfrPage;t2:tfrpictureview;
t: TfrshapeView;t1:tfrbarcodeview;
begin
frReport1.LoadFromFile('d:\rsc\try.frf');
Page := frReport1.Pages[0];
v := TfrEditControl.Create; // create editbox
v.SetBounds(60, 50, 75, 21);
v.Name := 'Edit1';
Page.Objects.Add(v); v := TfrButtonControl.Create; // create button
v.SetBounds(60, 100, 75, 25);
TfrButtonControl(v).Button.Caption := 'Test!';
TfrButtonControl(v).Button.Font.Name:='隶书';
TfrButtonControl(v).Button.ModalResult := mrOk;
Page.Objects.Add(v); v := Tfrcheckboxcontrol.Create; // create editbox
v.SetBounds(60, 150, 115, 21);
v.Name := 'checkbox1';
Tfrcheckboxcontrol(v).CheckBox.Caption:='姓名不同是否翻页?';
Tfrcheckboxcontrol(v).CheckBox.Checked:=true;
Page.Objects.Add(v); v := Tfrradiobuttoncontrol.Create; // create editbox
v.SetBounds(250, 150, 100, 21);
v.Name := 'ra1';
Tfrradiobuttoncontrol(v).RadioButton.Checked:=true;
Page.Objects.Add(v); v := Tfrcomboboxcontrol.Create; // create editbox
v.SetBounds(60, 200, 75, 21);
v.Name := 'com1';
Tfrcomboboxcontrol(v).ComboBox.Items.Add('123');
Tfrcomboboxcontrol(v).ComboBox.Items.Add('456');
Tfrcomboboxcontrol(v).ComboBox.Style:=csDropDownList;
Tfrcomboboxcontrol(v).ComboBox.ItemIndex:=0;
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); v:=tfrshapeview.Create;
v.SetBounds(328,20,96,20);
v.Name:='shape2';
Page.Objects.Add(v); v:=tfrlineview.Create;
v.SetBounds(200,20,0,20);
v.Name:='line1';
Page.Objects.Add(v); v:=tfrbarcodeview.Create;
v.SetBounds(444,20,142,20);
v.Name:='barcode1';
Page.Objects.Add(v); v := TfrMemoView.Create; // create memo
v.SetBounds(150, 20, 96, 20);
//v.BandAlign := baWidth;
v.Prop['Alignment'] := frtaCenter; // another way to access properties
v.Prop['Font.Style'] := 2;
v.Memo.Add('[dialogform.query1.sfgz]');
Page.Objects.Add(v); t1:= TfrbarcodeView(frReport1.FindObject('barcode1'));
if t1<>nil then t1.Memo.clear;t1.Memo.Add('[dialogform.query1.bh]'); t2:= TfrpictureView(frReport1.FindObject('zz'));
if t2<>nil then t2.Picture.LoadFromFile('d:\rsc\normal.ico'); t:= TfrshapeView(frReport1.FindObject('shape2'));
if t<>nil then t.ShapeType:=skDiagonal1; t3:= TfrlineView(frReport1.FindObject('line1'));
if t3<>nil then t3.FrameWidth:=10; frReport1.ShowReport;
end;end.
t: TfrbandView;
begin
t := TfrbandView(frReport1.FindObject('masterdata1'));
if t <> nil then begin showmessage('123');
t.Script.Add('memo1.memo:="123"');end;
测试通过