Hi, I created a temporary table, but when i can't get fetch it in my
report.

this is my step :
I. crate a method in my report.
Process_InventSum(str _Branch, str _ItemGroup)
{
   InventSum           InventSum;
   InventTable         InventTable;
   tmp_mlr_invt_sum    tmpTable;
   ;

   while select sum(postedqty), sum(deducted) from inventSum
   join inventTable group by itemgroupid
   where inventsum.ItemId==inventtable.ItemId
   {
            tmpTable.ItemGroupId = inventTable.ItemGroupId;
            tmpTable.InventQtyPosted = inventsum.PostedQty;
            tmptable.InventQtyDeducted = inventsum.Deducted;
            tmptable.insert();
          }
     
return tmpTable;
}

II. Override method Fetch in that report
public boolean fetch()
      {
          queryrun    qr;
          boolean     ret;
          Tmp_mlr_invt_sum    _tmpTab;
          ;
     
          if (element.args().caller())
          {
              cls_InvSum = element.args().caller();   // calling class
              BranchId = cls_InvSum.parmBranch();
              ItemGroup = cls_InvSum.parmItemGroup();
          }
     
          //insert data to temp table
          this.Process_InventSum(BranchId,ItemGroup);
           
          while select * from _tmpTab
          {
              DS_Tmp_MLR_Invt_Sum = qr.get(tablenum
(tmp_mlr_invt_sum));
    
              element.send(DS_Tmp_MLR_Invt_Sum);
              ret = true;
          }
     
          return ret;
}

It seems the insert method running (I trace it in debug), but in my
fetch method, in statement "while select .... ", they just pass it
like there is no record in my table.


rgds,
Anton










Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to