如何获取打印按钮的打印次数???
我想获取一个窗口中的打印次数,不知道该如何实现,下面的程序提示"无法编译",大家帮我看一下~~~,ps是一个计数器,获取后再写到数据库里~``procedure MyBeforePrint(ModID: Integer);
var
mr: TModalResult;
Flag: string;
PS: Integer;
begin
Flag := me.cdsMain.FieldByName('ParentXSKPNo').AsString;
PS := 0;
Repeat
PS := PS+1;
DirectExecuteSQL(GlobalConfig.DB.DBName, 'UPDATE tblXSKPMain SET PrintCount=ps WHERE XSKPNo='+
AnsiQuotedStr(Me.cdsMain.FieldByName(Me.ReceiptNoCol).AsString, SQLQUOTEDCHAR));
IF Flag = 'Y'then
begin
mr := MessageDlg('此单据之前已经打印,继续打印吗?', mtConfirmation, [mbYes, mbNo], 0);
if mr = mrNo then Abort;
end;
Until PS=5;
if Me.cdsMain.FieldByName('ParentXSKPNo').AsString <> 'Y' then
DirectExecuteSQL(GlobalConfig.DB.DBName, 'UPDATE tblXSKPMain SET ParentXSKPNo=''Y'' WHERE XSKPNo='+
AnsiQuotedStr(Me.cdsMain.FieldByName(Me.ReceiptNoCol).AsString, SQLQUOTEDCHAR));
end;

淘宝新到货: http://shop36082390. 电脑及配件/杀毒U盘/移动硬盘/减肥产品/切苹果器/剥蒜器/个性烟灰缸/装饰彩灯/雨伞/女包//手机座/极品铁观间茶叶/五层布衣柜/三洋/日立投影机
QQ:410243392 (常用)