Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

How can I remove the duplicate values ​​that are displayed after the join?

$
0
0

I generate an excel file that has data from several tables, the problem is that when I join with InventTrans, duplicate values ​​are displayed. How could I avoid this?

Another problem is when I do the join with PDSAdvancedPriceInfo to retrieve the value from the CalculatedUnitPrice field. When I add the join, no result is displayed.

 while select purchTable
        where purchTable.OrderAccount==_dataContract.parmVendAccount() ||
              purchTable.VendGroup==_dataContract.parmVendGroup()
        && purchTable.DeliveryDate >= _dataContract.parmFromDate ()
        && purchTable.DeliveryDate <= _dataContract.parmToDate ()
        join logisticsPostalAddress
        where purchTable.DeliveryPostalAddress==logisticsPostalAddress.RecId
        join  purchLine
        where purchLine.PurchId==purchTable.PurchId
        //join pdsAdvancedPriceInf
        //where pdsAdvancedPriceInf.PurchLineRefRecId==purchLine.RecId
        join inventDim
        where purchLine.InventDimId==inventDim.inventDimId
        join inventTrans
        where inventTrans.inventDimId==inventDim.inventDimId

    {
    row++;
    if (purchLine.PurchStatus==PurchStatus::Received || purchLine.PurchStatus==PurchStatus::Invoiced)
        {
           receivedStatus=PI_ReceivedStatus::FullyReceived;
           cell=cells.item(row,5);
           cell.value(enum2str(receivedStatus));
        }

       if(purchLine.PurchStatus!=PurchStatus::Received || purchLine.PurchStatus!=PurchStatus::Invoiced && inventTrans.StatusReceipt==StatusReceipt::Ordered)
        {  
           receivedStatus=PI_ReceivedStatus::ToBeReceived;
           cell=cells.item(row,5);
           cell.value(enum2str(receivedStatus));
        }
        
        //cell=cells.item(row,14);
       // cell.value(pdsAdvancedPriceInf.CalculatedUnitPrice);
    }

Viewing all articles
Browse latest Browse all 175888

Trending Articles



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