sum ,pack , addSelectionField() 合计字段
//breakpoint;    
    //-------------------行数     
    m_qrCount = new QueryRun(NJ_MF_SilverModelInventory_ds.queryRun().query().pack());     
    m_qbdsCount =   m_qrCount.query().dataSourceNo(1);     
    m_qbdsCount.addSelectionField(fieldNum(NJ_MF_SilverModelInventory_tbl,RecId),SelectionField::Count); 
    if (!m_qrCount.getNo(1))    //叛断记录是否空,如果为空则返回0    
         LineCount.value(0);     
    while(m_qrCount.next())     
    {     
        LineCount.value(any2int(m_qrCount.getNo(1).RecId)); 
    }    
//----------------------------银版总量     
    m_qrCount = new QueryRun(NJ_MF_SilverModelInventory_ds.queryRun().query().pack());     
    m_qbdsCount =   m_qrCount.query().dataSourceNo(1);     
    m_qbdsCount.addSelectionField(fieldnum(NJ_MF_SilverModelInventory_tbl,Set_qty),SelectionField::Sum); 
    if (!m_qrCount.getNo(1))    //叛断记录是否空,如果为空则返回0    
         ModelTotal.value(0);     
    while(m_qrCount.next())     
    {     
        tmp = m_qrCount.getNo(1);     
        ModelTotal.value(any2int(m_qrCount.getNo(1).(fieldnum(NJ_MF_SilverModelInventory_tbl,Set_qty)))); 
}
                    
                
                
            
        
浙公网安备 33010602011771号