Hi
Try using the AX Standard way of getting an query for inventory on hand. You will find that on the table InventDim. Query query; QueryRun queryRun; inventDimParm inventDimParmCriteria; inventDimParm inventDimParmGroupby; InventDim inventDim; InventSum inventSum; ; inventDimParmCriteria.ClosedFlag = NoYes::Yes; inventDimParmCriteria.InventBatchIdFlag = NoYes::Yes; inventDimParmGroupby.ItemIdFlag = NoYes::Yes; inventDimParmGroupby.InventBatchIdFlag = NoYes::Yes; query = InventSum::newQuery(query,'',null,inventDimParmCriteria,inventDimParmGroupby); queryRun = new QueryRun(query); while (queryRun.next()) { inventSum = queryRun.get(tableNum(InventSum)); inventDim = queryRun.get(tableNum(InventDim)); } Mit freundlichen Grüßen / Best regards / Med venlig hilsen Jesper Jørgensen / Abt. NMT-XD Senior Product Manager arvato systems | Technologies GmbH An der Autobahn 18 33311 Gütersloh [EMAIL PROTECTED] <blocked::blocked::blocked::mailto:[EMAIL PROTECTED]> Phone: +49 5242 / 40 80 54 Fax: +49 5242 / 40 80 40 Mobile: +49 172 / 571 03 34 http://www.as-T.biz <blocked::blocked::http://www.as-t.biz/> arvato systems | Technologies GmbH Joachim-Jungius-Str. 9, 18059 Rostock Geschäftsführung: Erwin Pietz, Matthias Moeller Amtsgericht Rostock - HRB 7497 ________________________________ "Der Inhalt dieser Nachricht oder eventueller Anlagen ist vertraulich und ausschließlich für den bezeichneten Adressaten bestimmt. Bitte stellen Sie sicher, dass die Information in dieser Nachricht ausschließlich an die adressierten Personen gelangt. Sollte diese Nachricht versehentlich an Sie gesendet worden sein, dann informieren Sie bitte umgehend den Absender und löschen Sie die Nachricht. Vielen Dank." "The information in this e-mail and any attachments is confidential. The information must only be held in areas that have controlled and limited access to the addressed persons. If this e-mail has been sent to you in error, please immediately notify the sender and delete the e-mail. Thanks." ________________________________ ________________________________ Von: development-axapta@yahoogroups.com [mailto:[EMAIL PROTECTED] Im Auftrag von letron_brantley Gesendet: Montag, 16. Juni 2008 15:49 An: development-axapta@yahoogroups.com Betreff: [development-axapta] Problem with simple report. I'm trying to create a simple report that shows: Item, Description, Batch, and Qty OnHand. In the query element of my report I have the following datasources: InventSum (ordermode==orderby) | |--InventDim (ordermode==groupby)(fetchmode==1:1) (joinmode==innerjoin) | (relation: inventdim.inventdimid==inventsum.inventdimid) | |--InventBatch (ordermode==groupby)(fetchmode==1:1) (joinmode==innerjoin) | (relation: inventbatch.inventbatchid==inventdim.inventbatchid) | |--InventTable (ordermode==groupby) (fetchmode==1:1)(joinmode==innerjoin) (relation: inventtable.itemid==inventbatch.itemid) My result should look something similar to this: __________________________________________________________ | | | Item | Description | Lot | On Hand | __________________________________________________________ | | 100 | BMX Bike - Girl's Edit. | BMX003 | 56 | | BMX004 | 73 | __________________________________________________________ | Total | 129 | | | __________________________________________________________ | 102 | Skate Board | SKT002 | 104 | __________________________________________________________ | 167 | Basket Ball | BBL002 | 200 | __________________________________________________________ etc... Can anyone offer some insight at to settings to make this happen. I am able to get the data but I'm having a problem with grouping. Thanks, Ltrain [Non-text portions of this message have been removed]