报表打印多张的方法示例

init方法参考:

 

 public void init()
 {

    Object           caller;
    ;

    super();

    caller=element.args().caller();

    if(classidget(caller) == classnum(EajSilverEditonProductionClass))
    {
        prodTables=caller.parmProdTable();
        if(prodTables.dataSource()){
            fdsProdTable=prodTables.dataSource();
        }
    }
}

 

 

 

fetch方法示例:

 


public boolean fetch()
{

    boolean ret;


    //QueryRun curQueryRun;
    int i,j,m,n;
    ;

    for (prodTables = fdsProdTable.getFirst(true) ? fdsProdTable.getFirst(true): fdsProdTable.cursor();
                      prodTables; prodTables = fdsProdTable.getNext())
    {
         m++;
    }
    element.printJobSettings().suppressScalingMessage(true);

    for (prodTables = fdsProdTable.getFirst(true) ? fdsProdTable.getFirst(true): fdsProdTable.cursor();
                      prodTables; prodTables = fdsProdTable.getNext())
    {

            n++;
            j=0;
            element.execute(1);//print ProdOrder
            element.execute(2);

            //print bomBody
            while select prodBom index hint NumIdx
                        where prodBom.BOMId == prodTables.BOMId
            {
                j++;
                element.execute(3);//print bom item
            }
            if(j<13)
            {

              for(i=1;i<=13-j;i+=1)//print blank item
              {
                   element.execute(4);
              }
           }

           element.execute(5);
           element.execute(7);//print editionAndProcessTitle Item
           element.execute(10);
           element.execute(12);

           if(n!=m)
           {
                 element.reset();
           }

    }
    ret = true;

    return ret;

}

 

 

class方法:

   返回ID参考方法:

 

 public str parmConProdId(ProdId _conProdId = prodId)
{
    ;
    if (_conProdId)
    {
        if (prodId)
            prodId += ',' + _conProdId;
        else
            prodId = _conProdId;
    }

    return prodId;
}

 

返回Table方法示例:

ProdTable parmProdTable(ProdTable   _prodTable = prodTable)
{
    ;
    prodTable=_prodTable;

    return prodTable;
}

 

unpack()方法:

public boolean unpack(container packedClass)
{
    boolean ret;

    ret = super(packedClass);

    return ret;
}

 

启动main()方法:

public static void main(Args _args)
{
    EajSilverEditonProductionClass eajSilverEditonProductionClass = new EajSilverEditonProductionClass();


    ;

    if (!_args || !_args.record() || _args.dataset() != tablenum(ProdTable))
    {
        info("Please chose printed record to print ","",null);

        return ;
    }


    if(eajSilverEditonProductionClass.prompt()){
           eajSilverEditonProductionClass.parmProdTable(_args.record());
           eajSilverEditonProductionClass.run();
    }
}

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值