11.01.2008, 11:01 | #1 |
Участник
|
Отчет "Запасы в наличии"
Приветствую всех. Решил тут немного модифицировать вышеупомянутый отчет и столкнулся с необъяснымыми явлениями.
По порядку: AX 3.0, Управление запасами \ Отчеты \ В наличии \ Запасы в наличии Из Query репорта убираю таблицу InventTableModule(хотя и с ней пробовал - все равно не работало). Запускаю отчет с параметрами - получается такой вот запрос: Код: SELECT A.ITEMNAME,SUM(B.POSTEDQTY),SUM(B.POSTEDVALUE),SUM(B.PHYSICALVALUE),SUM(B.DEDUCTED),SUM(B.REGISTERED),SUM(B.RECEIVED),SUM(B.PICKED),SUM(B.RESERVPHYSICAL),SUM(B.RESERVORDERED),SUM(B.ONORDER),SUM(B.ORDERED),SUM(B.ARRIVED),SUM(B.QUOTATIONRECEIPT),SUM(B.QUOTATIONISSUE),SUM(B.PHYSICALINVENT),SUM(B.POSTEDVALUESECCUR_RU),SUM(B.PHYSICALVALUESECCUR_RU),SUM(B.AVAILPHYSICAL),SUM(B.AVAILORDERED),B.ITEMID,C.INVENTCOLORID FROM INVENTTABLE A WITH( NOLOCK), INVENTSUM B WITH( NOLOCK), INVENTDIM C WITH( NOLOCK) WHERE ((A.DATAAREAID='vir') AND ((A.ITEMID LIKE '000-02%' ESCAPE '\' ) AND (A.INVENTGROUPID1='Отделка_1'))) AND ((B.DATAAREAID='vir') AND (A.ITEMID=B.ITEMID)) AND ((C.DATAAREAID='vir') AND ((C.INVENTLOCATIONID LIKE 'arh%' ESCAPE '\' ) AND (B.INVENTDIMID=C.INVENTDIMID))) GROUP BY A.ITEMNAME,B.ITEMID,C.INVENTCOLORID ORDER BY A.ITEMNAME,B.ITEMID,C.INVENTCOLORID OPTION(FAST 6) Код: SELECT A.ITEMNAME,SUM(B.POSTEDQTY),SUM(B.POSTEDVALUE),SUM(B.PHYSICALVALUE),SUM(B.DEDUCTED),SUM(B.REGISTERED),SUM(B.RECEIVED),SUM(B.PICKED),SUM(B.RESERVPHYSICAL),SUM(B.RESERVORDERED),SUM(B.ONORDER),SUM(B.ORDERED),SUM(B.ARRIVED),SUM(B.QUOTATIONRECEIPT),SUM(B.QUOTATIONISSUE),SUM(B.PHYSICALINVENT),SUM(B.POSTEDVALUESECCUR_RU),SUM(B.PHYSICALVALUESECCUR_RU),SUM(B.AVAILPHYSICAL),SUM(B.AVAILORDERED),B.ITEMID,C.INVENTCOLORID FROM INVENTTABLE A WITH( NOLOCK), INVENTSUM B WITH( NOLOCK), INVENTDIM C WITH( NOLOCK), INVENTLOCATION D WITH( NOLOCK) WHERE ((A.DATAAREAID='vir') AND ((A.ITEMID LIKE '000-02%' ESCAPE '\' ) AND (A.INVENTGROUPID1='Отделка_1'))) AND ((B.DATAAREAID='vir') AND (A.ITEMID=B.ITEMID)) AND ((C.DATAAREAID='vir') AND ((C.INVENTLOCATIONID LIKE 'arh%' ESCAPE '\' ) AND (B.INVENTDIMID=C.INVENTDIMID))) AND ((D.DATAAREAID='vir') AND (C.INVENTLOCATIONID=D.INVENTLOCATIONID)) GROUP BY A.ITEMNAME,B.ITEMID,C.INVENTCOLORID ORDER BY A.ITEMNAME,B.ITEMID,C.INVENTCOLORID OPTION(FAST 5) |
|
Теги |
ax3.0 |
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|