你用没用QUICKREPORT组件?这个组件问题比较多,就是你的程序没有问题,在打印的时候也会出错的。
解决方案 »
- 学了一段时间,有点不想学了
- 变量t是TStringList类型的,变量f是text类型的,想把f赋给t可以吗,怎么赋啊!
- 怎么样在Delphi程序中增加代码,使用程序自己启动后自己删除自己
- Power Designer这个软件谁有?或者下载地址?高分相送。
- 有用OpenGL写ARPG的吗?Edit部分 开发 讨论一下 :-)
- 有没有DELPHI FOR PHp 资料?
- 要用dephi写一个OCX,按照小时给钱。赶紧联系我 qq:9417901
- 一名新手的呼唤
- delphi 跟bcb谁强?
- 为何我写的控件有的事件不响应
- DBLookupComboBox数据显示问题,我快要疯了
- 苦苦寻觅Delphi开发的ActiveX的源码!不知那个网站上有?知道或有的神仙请进来!
//查询当前账单号
with qry_accntid do
begin
close;
sql.clear;
sql.Add('select currentaccntid from accntSerial');
open;
end;
std:=tinifile.create('lxyzh.ini');
TITLEMC:=std.READstring('TITLE', 'MC', '新概念俱乐部');
std.free;
form_warning:=tform_warning.Create(self);
form_warning.ShowModal;
if form_warning.ModalResult=mrok then
begin
rep_accnt:=trep_accnt.create(self);
Rep_accnt.QRLabel1.Caption:=titlemc+'结帐单';
rep_accnt.Qrlth.caption:=form_custlist.table_custtableid.Value;
rep_accnt.qrlfwy.caption:=form_custlist.table_custwaiterid.Value;
if trim(edit_xian.text)='' then
rep_accnt.xian.caption:='0'
else
rep_accnt.xian.caption:=edit_xian.text;
if trim(edit_quan.text)='' then
rep_accnt.quan.caption:='0'
else
rep_accnt.quan.caption:=edit_quan.text;
if trim(edit_qian.text)='' then
rep_accnt.qian.caption:='0'
else
rep_accnt.qian.caption:=edit_qian.text;
if trim(edit_zhe.text)='' then
rep_accnt.zhe.caption:='0'
else
rep_accnt.zhe.caption:=edit_zhe.text;
if trim(edit_zhao.text)='' then
rep_accnt.zhao.caption:='0'
else
rep_accnt.zhao.caption:=edit_zhao.text;
if trim(edit_zhi.text)='' then
rep_accnt.zhi.caption:='0'
else
rep_accnt.zhi.caption:=edit_zhi.text;
with query1 do
begin
close;
parambyname('waiterid').datatype:=ftstring;
parambyname('waiterid').asstring:=form_custlist.table_custwaiterid.Value;
prepare;
open;
rep_accnt.qrlfwy.caption:=fieldbyname('name').asstring;
end;
rep_accnt.qrlzd.caption:=formatfloat('00000000',qry_accntid.fieldbyname('Currentaccntid').asfloat);
if Label4.caption<>'' then
rep_accnt.qrlshsh.Caption:=Label4.caption
else
rep_accnt.qrlshsh.Caption:='0';
if strtoint(label1.caption) < strtoint(form_custlist.table_custlowprice.Value) then
rep_accnt.qrlysh.Caption:=form_custlist.table_custlowprice.Value
else
rep_accnt.qrlysh.Caption:=label1.Caption;
rep_accnt.Preview;
rep_accnt.free;
end;
谢谢各位了!
//查询当前账单号
with qry_accntid do
begin
close;
sql.clear;
sql.Add('select currentaccntid from accntSerial');
open;
end;
std:=tinifile.create('lxyzh.ini');
TITLEMC:=std.READstring('TITLE', 'MC', '新概念俱乐部');
std.free;
form_warning:=tform_warning.Create(self);
form_warning.ShowModal;
if form_warning.ModalResult=mrok then
begin
rep_accnt:=trep_accnt.create(self);
Rep_accnt.QRLabel1.Caption:=titlemc+'结帐单';
rep_accnt.Qrlth.caption:=form_custlist.table_custtableid.Value;
rep_accnt.qrlfwy.caption:=form_custlist.table_custwaiterid.Value;
if trim(edit_xian.text)='' then
rep_accnt.xian.caption:='0'
else
rep_accnt.xian.caption:=edit_xian.text;
if trim(edit_quan.text)='' then
rep_accnt.quan.caption:='0'
else
rep_accnt.quan.caption:=edit_quan.text;
if trim(edit_qian.text)='' then
rep_accnt.qian.caption:='0'
else
rep_accnt.qian.caption:=edit_qian.text;
if trim(edit_zhe.text)='' then
rep_accnt.zhe.caption:='0'
else
rep_accnt.zhe.caption:=edit_zhe.text;
if trim(edit_zhao.text)='' then
rep_accnt.zhao.caption:='0'
else
rep_accnt.zhao.caption:=edit_zhao.text;
if trim(edit_zhi.text)='' then
rep_accnt.zhi.caption:='0'
else
rep_accnt.zhi.caption:=edit_zhi.text;
with query1 do
begin
close;
parambyname('waiterid').datatype:=ftstring;
parambyname('waiterid').asstring:=form_custlist.table_custwaiterid.Value;
prepare;
open;
rep_accnt.qrlfwy.caption:=fieldbyname('name').asstring;
end;
rep_accnt.qrlzd.caption:=formatfloat('00000000',qry_accntid.fieldbyname('Currentaccntid').asfloat);
if Label4.caption<>'' then
rep_accnt.qrlshsh.Caption:=Label4.caption
else
rep_accnt.qrlshsh.Caption:='0';
if strtoint(label1.caption) < strtoint(form_custlist.table_custlowprice.Value) then
rep_accnt.qrlysh.Caption:=form_custlist.table_custlowprice.Value
else
rep_accnt.qrlysh.Caption:=label1.Caption;
rep_accnt.Preview;
rep_accnt.free;
end;
谢谢各位了!