Quantcast
Viewing all articles
Browse latest Browse all 73760

AX 2009: How to return data in collection read from DB in Report's executeSection method

Hello,

I have to read data from Database in my MorphX based report and then return it in Collection (multiple rows).

There is element..send method in method executeSection but how to return collection of e.g. Table objects back to Report with it?

I have a code snippet that I tried to do it.

public void executeSection()
{
ProdBOM pbom;
ProdRoute prRoute;
RecordSortedList recordSortedList = new RecordSortedList(tablenum(ProdBOM));
ProdBOM pbomtable;
ReportControl control;
int i;
;

i = 0;

while select pbom
join prRoute
where (pbom.OprNum == prRoute.OprNum && pbom.prodId == prRoute.prodId)
{
if(i > 0) // Not first one!
{
recordSortedList.ins(pbom);
}
else
{
i++;
}
}

element.send( how to convert recordSortedList into ProdBOM list???? );

Best Regards,

Mike



Viewing all articles
Browse latest Browse all 73760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>