你用没用QUICKREPORT组件?这个组件问题比较多,就是你的程序没有问题,在打印的时候也会出错的。
解决方案 »
- Delphi 2010 Uint64转换为AnsiString
- 请问如何得到系统已注册的钩子
- 关于FR预览的问题
- 来者有分!!!
- DWord不是32位的吗?为什么连两个字符的数据都放不了呢?
- 了解一下,谁是中国DELPHI第一人??
- 自学考试报了《电子技术》、《通信技术专业》的前辈请进?
- 关于用ftp和com做远程数据传输的程序。要求能够在远程的不同数据库之间传输数据,以及传输文件,如excel和txt文件。
- 每次窗体重新LOAD时总要手工更新它上面的控件以前留下的内容吗?
- 如何检测一个指定文件夹下是否有exe文件?急急急!
- 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;
谢谢各位了!