对筛选之后的grid进行求和统计

对筛选之后的grid进行求和统计

    NJ_MF_SilverModelInventory_tbl          Smi;

    NJ_MF_SilverModelInventory_tbl  tmp;

    QueryRun                m_qrCount;

    QueryBuildDataSource    m_qbdsCount;

 ;

    //-------------------行数

    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));

    }

posted @ 2011-07-28 08:52  perock  阅读(289)  评论(0编辑  收藏  举报