X
xuziling20
Unregistered / Unconfirmed
GUEST, unregistred user!
严重同意 lhc4000 朋友的说法。 程序可如下改
var F:TextFile;
begin
qrybillprint.Open();//此处可改为ADOQUERY数据源,用 SELECT TOP 来控制数据量,就好了。要么就需要延时
ASSIGNFILE(F,'LPT1');
REWRITE(F);
WRITELN(F,' 出 品 小 票');
Writeln(F,'——————————————————————');
Writeln(F,' 台号:'+qrybillprint.FieldByName('fldDeskID').AsString+' '+ FormatDateTime('yyyy-mm-dd hh:mm:ss',Now()));
Writeln(F,' 帐单号: '+ qrybillprint.FieldByName('fldBillCode').AsString);
Writeln(F,'——————————————————————');
while not qrybillprint.Eofdo
begin
Writeln(F,' '+qrybillprint.FieldByName('fldItemCode').AsString+' '+qrybillprint.FieldByName('fldItemName').AsString);
Writeln(F,' '+'数量: '+qrybillprint.FieldByName('fldQty').AsString);
Writeln(F,'——————————————————————');
qrybillprint.Next();
end;
qrybillprint.Close();
CloseFile(F);
end;
var F:TextFile;
begin
qrybillprint.Open();//此处可改为ADOQUERY数据源,用 SELECT TOP 来控制数据量,就好了。要么就需要延时
ASSIGNFILE(F,'LPT1');
REWRITE(F);
WRITELN(F,' 出 品 小 票');
Writeln(F,'——————————————————————');
Writeln(F,' 台号:'+qrybillprint.FieldByName('fldDeskID').AsString+' '+ FormatDateTime('yyyy-mm-dd hh:mm:ss',Now()));
Writeln(F,' 帐单号: '+ qrybillprint.FieldByName('fldBillCode').AsString);
Writeln(F,'——————————————————————');
while not qrybillprint.Eofdo
begin
Writeln(F,' '+qrybillprint.FieldByName('fldItemCode').AsString+' '+qrybillprint.FieldByName('fldItemName').AsString);
Writeln(F,' '+'数量: '+qrybillprint.FieldByName('fldQty').AsString);
Writeln(F,'——————————————————————');
qrybillprint.Next();
end;
qrybillprint.Close();
CloseFile(F);
end;