请问StringGrid内容导入quickreport的方法 ( 积分: 100 )

  • 主题发起人 主题发起人 ohmymother
  • 开始时间 开始时间
O

ohmymother

Unregistered / Unconfirmed
GUEST, unregistred user!
请问StringGrid内容导入quickreport的方法!!!
 
procedure TForm5.QuickRep1NeedData(Sender: TObject;
var MoreData: Boolean);
begin
MoreData:=True;
if bFirstPage then
begin
//round((Remark.Lines.Count + QrMemo1.Lines.Count + QrMemo2.Lines.Count)*19.0/26.0) modify by xiong,in 06.05.10
nLine := Fist_Page_Line - (Remark.Lines.Count + QrMemo1.Lines.Count + QrMemo2.Lines.Count);
if nLine <= 0 then
Exit;
end;
if iLine >= nLine then
begin
bFirstPage := False;
iLine := 0;
Fnum := Fnum + nLine;
nLine := Second_Page_Line;
if Fnum < Form2.sg.RowCount then
QuickRep1.NewColumn;
end;
inc(iLine);
with Form2.sgdo
begin
//The content of the report
if cells[1,Fnum]='No' then
box.Caption :='' else
box.Caption :=cells[1,Fnum];
lotno.Caption := cells[2,Fnum];
cprocode.Caption := cells[3,Fnum];
res.Caption := cells[4,Fnum];
num.Caption := cells[5,Fnum];
if cells[1,Fnum+ nline]='No' then
box2.Caption :='' else
box2.Caption :=cells[1,Fnum+ nline];
lotno2.Caption := cells[2,Fnum+ nline];
cprocode2.Caption := cells[3,Fnum+ nline];
res2.Caption := cells[4,Fnum+ nline];
num2.Caption := cells[5,Fnum+ nline];
end;
Inc(FNum);
if FNum > Form2.sg.RowCount then
begin
bFirstPage := True;
MoreData:=False;// 不打印
FNum:=1;
end;
end;
 
后退
顶部