D
dafuwengqing
Unregistered / Unconfirmed
GUEST, unregistred user!
fastreport 2.5 怎么分页?(急)
我的代码如下,但是总是显示最后一条记录的内容?
procedure TForm_print.Button_printClick(Sender: TObject);
var
i:integer;
Memo_xm,Memo_nf,Memo_jd,Memo_km,Memo_dj,Memo_bh,Memo_km1:TfrMemoView;
Page:TfrPage;
km,mykm:string;
begin
frReport1.Clear;
frReport1.LoadFromFile(extractfilepath(application.ExeName)+'Untitled.frf');
for i:=0 to ListView.Items.Count -1do
begin
Memo_xm:=TfrMemoView(frReport1.FindObject('Memo2'));
Memo_nf:=TfrMemoView(frReport1.FindObject('Memo3'));
//Memo_nf:=TfrxMemoView(frReport1.FindObject('Memo3'));
Memo_jd:=TfrMemoView(frReport1.FindObject('Memo4'));
Memo_km:=TfrMemoView(frReport1.FindObject('Memo5'));
Memo_dj:=TfrMemoView(frReport1.FindObject('Memo6'));
Memo_bh:=TfrMemoView(frReport1.FindObject('Memo7'));
Memo_km1:=TfrMemoView(frReport1.FindObject('Memo12'));
if Memo_xm<>nil then
Memo_xm.Memo.Text:=listview.Items.SubItems.Strings[0];
if Memo_km<>nil then
//Memo_km.Memo.Text:=listview.Items.SubItems.Strings[3];
begin
km:= listview.Items.SubItems.Strings[3];
Memo_km.Memo.Text:= copy(km,5,length(km)-1);
end;
if Memo_dj<>nil then
Memo_dj.Memo.Text:=listview.Items.SubItems.Strings[2];
if Memo_bh<>nil then
Memo_bh.Memo.Text:=listview.Items.Caption;
if Memo_km1<>nil then
Memo_km1.Memo.Text:= copy(listview.Items.SubItems.Strings[3],1,4);
end;
if frReport1.PrepareReport then
frReport1.ShowPreparedReport;
end;
我的代码如下,但是总是显示最后一条记录的内容?
procedure TForm_print.Button_printClick(Sender: TObject);
var
i:integer;
Memo_xm,Memo_nf,Memo_jd,Memo_km,Memo_dj,Memo_bh,Memo_km1:TfrMemoView;
Page:TfrPage;
km,mykm:string;
begin
frReport1.Clear;
frReport1.LoadFromFile(extractfilepath(application.ExeName)+'Untitled.frf');
for i:=0 to ListView.Items.Count -1do
begin
Memo_xm:=TfrMemoView(frReport1.FindObject('Memo2'));
Memo_nf:=TfrMemoView(frReport1.FindObject('Memo3'));
//Memo_nf:=TfrxMemoView(frReport1.FindObject('Memo3'));
Memo_jd:=TfrMemoView(frReport1.FindObject('Memo4'));
Memo_km:=TfrMemoView(frReport1.FindObject('Memo5'));
Memo_dj:=TfrMemoView(frReport1.FindObject('Memo6'));
Memo_bh:=TfrMemoView(frReport1.FindObject('Memo7'));
Memo_km1:=TfrMemoView(frReport1.FindObject('Memo12'));
if Memo_xm<>nil then
Memo_xm.Memo.Text:=listview.Items.SubItems.Strings[0];
if Memo_km<>nil then
//Memo_km.Memo.Text:=listview.Items.SubItems.Strings[3];
begin
km:= listview.Items.SubItems.Strings[3];
Memo_km.Memo.Text:= copy(km,5,length(km)-1);
end;
if Memo_dj<>nil then
Memo_dj.Memo.Text:=listview.Items.SubItems.Strings[2];
if Memo_bh<>nil then
Memo_bh.Memo.Text:=listview.Items.Caption;
if Memo_km1<>nil then
Memo_km1.Memo.Text:= copy(listview.Items.SubItems.Strings[3],1,4);
end;
if frReport1.PrepareReport then
frReport1.ShowPreparedReport;
end;