起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 152|回复: 3

打印多个文档问题

[复制链接]
发表于 2010-4-21 17:43:40 | 显示全部楼层 |阅读模式
我这有下面代码,当int_i=0时,弹出打印选择框,后面的自动按之前选择的印表机列印,
但是有一个问题,当第一次弹出打印选择框时,选择的是取消,后面的也会列印出来,不能怎么实现这个功能?
int_i:=0;
  InfoBroker2.Info.DataSetByID('cux_order_sign_detail').first;
  while not InfoBroker2.Info.DataSetByID('cux_order_sign_detail').Eof do
  begin
    //打印
     if int_i=0 then
    begin
    TSheetDoc(DocView1.Doc).Exporter.Print;
    end;
    if int_i<>0 then
    begin
    TSheetDoc(DocView1.Doc).Exporter.PrintEx(false,true);
    end;
    TSheetDoc(DocView1.Doc).Exporter.Print;
    InfoBroker2.Info.DataSetByID('cux_order_sign_detail').edit ;
    InfoBroker2.Info.DataSetByID('cux_order_sign_detail').FieldByName('picked_print').Asinteger:=(InfoBroker2.Info.DataSetByID('cux_order_sign_detail').FieldByName('picked_print').Asinteger +1);
    InfoBroker2.Info.DataSetByID('cux_order_sign_detail').FieldByName('picked_print_user').Asstring:=lsuser;
    InfoBroker2.Info.DataSetByID('cux_order_sign_detail').FieldByName('picked_print_date').Asstring:=Business.System.SysUtils.formatdatetime('yyyy-mm-dd hh:mm:ss',Business.System.SysUtils.Now);
    InfoBroker2.Info.DataSetByID('cux_order_sign_detail').next;
    int_i:=int_i+1;
  end;
    InfoBroker2.Info.DataSetByID('cux_order_sign_detail').ApplyUpdates;
回复

使用道具 举报

 楼主| 发表于 2010-4-21 17:44:58 | 显示全部楼层
急救...
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-4-22 09:48:14 | 显示全部楼层
拜托X3的大哥帮帮忙啦
回复 支持 反对

使用道具 举报

发表于 2010-4-22 13:29:33 | 显示全部楼层
只能自己增加个对话框!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-9 04:11 , Processed in 0.037842 second(s), 15 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表