Hello!



Try this!



tmp_mlr_invt_sum Process_InventSum(str _Branch, str _ItemGroup)

{

      /.../

}



public boolean fetch()
{
      /.../



//insert data to temp table
_tmpTab.setTmpData(this.Process_InventSum(BranchId,ItemGroup));



            /.../

}



Best regards,

Arpad Melega



________________________________

From: anton_tjiptadi [mailto:[EMAIL PROTECTED]
Sent: Monday, December 20, 2004 2:50 AM
To: [EMAIL PROTECTED]
Subject: [development-axapta] How to read temporary table ?





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 <http://us.ard.yahoo.com/SIG=129p8n7j6/M=294855.5468653.6549235.3001176/D=groups/S=1705006764:HM/EXP=1103615058/A=2455396/R=0/SIG=119u9qmi7/*http:/smallbusiness.yahoo.com/domains/>

<http://us.adserver.yahoo.com/l?M=294855.5468653.6549235.3001176/D=groups/S=:HM/A=2455396/rand=509155980>



________________________________

Yahoo! Groups Links

*      To visit your group on the web, go to:
      http://groups.yahoo.com/group/development-axapta/
       
*      To unsubscribe from this group, send an email to:
      [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
       
*      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service <http://docs.yahoo.com/info/terms/> .



[Non-text portions of this message have been removed]





Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to