I think you need to do something like this:
tmpTab = this.Process_InventSum(BranchId,ItemGroup);
You are just calling the method (this.Process_InventSum(BranchId,ItemGroup) but you are not capturing the return value.
Varden Morris
J. Wray & Nephew Ltd. - Group I.S.
Phone: (876) - 923 - 6141 Ext. 2400, 2412
Fax: (876) - 923 - 5372
Cell: (876) - 3833566
Email: [EMAIL PROTECTED]
anton_tjiptadi <[EMAIL PROTECTED]> wrote:
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
Sharing the knowledge on Axapta.
Do you Yahoo!?
Yahoo! Mail - now with 250MB free storage. Learn more.
Sharing the knowledge on Axapta.
Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/Axapta-Knowledge-Village/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.