Change the code in Global Variables in the Stock Shipped not Invoiced report (10541)as follows:
Existing code 1...
NoOfItems@1040006 : Integer;
...
Replacement code 1...
NoOfItems@1040006 : Integer;
// Add the following lines.
ItemQuantity@1040007 : Decimal;
ItemCostAmount@1040008 : Decimal;
ItemShippedQty@1040009 : Decimal;
ItemInvoicedQty@1040010 : Decimal;
ItemCostAmtExpected@1040011 : Decimal;
ItemQuantityTotal@1040012 : Decimal;
ItemCostAmountTotal@1040013 : Decimal;
ItemShippedQtyTotal@1040014 : Decimal;
ItemInvoicedQtyTotal@1040015 : Decimal;
ItemCostAmtExpectedTotal@1040016 : Decimal;
// End of the added lines.
...
Existing code 2...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry__Quantity.Value)-Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>39</ZIndex>
...
Replacement code 2...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065.Value)</Value>
// End of the added line.
<ZIndex>39</ZIndex>
...
Existing code 3...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Cost_Amount__Expected__.Value)-Sum(Fields!Value_Entry__Cost_Amount__Actual__.Value)</Value>
// End of the deleted line.
<ZIndex>38</ZIndex>
...
Replacement code 3...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069.Value)</Value>
// End of the added line.
<ZIndex>38</ZIndex>
...
Existing code 4...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry__Quantity.Value)</Value>
// End of the deleted line.
<ZIndex>37</ZIndex>
...
Replacement code 4...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity_Control1040066.Value)</Value>
// End of the added line.
<ZIndex>37</ZIndex>
...
Existing code 5...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>36</ZIndex>
...
Replacement code 5...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Invoiced_Quantity__Control1040067.Value)</Value>
// End of the added line.
<ZIndex>36</ZIndex>
...
Existing code 6...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Cost_Amount__Expected__.Value)</Value>
// End of the deleted line.
<ZIndex>35</ZIndex>
...
Replacement code 6...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected___Control1040068.Value)</Value>
// End of the added line.
<ZIndex>35</ZIndex>
...
Existing code 7...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040080.Value)</Value>
// End of the deleted line.
<ZIndex>12</ZIndex>
...
Replacement code 7...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040080.Value)</Value>
// End of the added line.
<ZIndex>12</ZIndex>
...
Existing code 8...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Cost_Amount__Expected__.Value)-Sum(Fields!Value_Entry__Cost_Amount__Actual__.Value)</Value>
// End of the deleted line.
<ZIndex>11</ZIndex>
...
Replacement code 8...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040081.Value)</Value>
// End of the added line.
<ZIndex>11</ZIndex>
...
Existing code 9...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry__Quantity.Value)</Value>
// End of the deleted line.
<ZIndex>10</ZIndex>
...
Replacement code 9...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Item_Ledger_Entry__Quantity.Value)</Value>
// End of the added line.
<ZIndex>10</ZIndex>
...
Existing code 10...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>9</ZIndex>
...
Replacement code 10...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Invoiced_Quantity_.Value)</Value>
// End of the added line.
<ZIndex>9</ZIndex>
...
Existing code 11...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Cost_Amount__Expected__.Value)</Value>
// End of the deleted line.
<ZIndex>8</ZIndex>
...
Replacement code 11...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Item_Ledger_Entry___Cost_Amount__Expected__.Value)</Value>
// End of the added line.
<ZIndex>8</ZIndex>
...
Existing code 12...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry_Quantity.Value)-Sum(Fields!Item_Ledger_Entry__Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>20</ZIndex>
...
Replacement code 12...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040040.Value)</Value>
// End of the added line.
<ZIndex>20</ZIndex>
...
Existing code 13...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Cost_Amount__Expected__.Value)-Sum(Fields!Value_Entry__Cost_Amount__Actual__.Value)</Value>
// End of the deleted line.
<ZIndex>19</ZIndex>
...
Replacement code 13...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040058.Value)</Value>
// End of the added line.
<ZIndex>19</ZIndex>
...
Existing code 14...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry_Quantity.Value)</Value>
// End of the deleted line.
<ZIndex>18</ZIndex>
...
Replacement code 14...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity_Control1040032.Value)</Value>
// End of the added line.
<ZIndex>18</ZIndex>
...
Existing code 15...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>17</ZIndex>
...
Replacement code 15...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Invoiced_Quantity__Control1040034.Value)</Value>
// End of the added line.
<ZIndex>17</ZIndex>
...
Existing code 16...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Cost_Amount__Expected__.Value)</Value>
// End of the deleted line.
<ZIndex>16</ZIndex>
...
Replacement code 16...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected___Control1040035.Value)</Value>
// End of the added line.
<ZIndex>16</ZIndex>
...
Existing code 17...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry_Quantity.Value)-Sum(Fields!Item_Ledger_Entry__Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>29</ZIndex>
...
Replacement code 17...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity_.Value)</Value>
// End of the added line.
<ZIndex>29</ZIndex>
...
Existing code 18...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Cost_Amount__Expected__.Value)-Sum(Fields!Value_Entry__Cost_Amount__Actual__.Value)</Value>
// End of the deleted line.
<ZIndex>28</ZIndex>
...
Replacement code 18...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual__.Value)</Value>
// End of the added line.
<ZIndex>28</ZIndex>
...
Existing code 19...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry_Quantity.Value)</Value>
// End of the deleted line.
<ZIndex>27</ZIndex>
...
Replacement code 19...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry__Quantity.Value)</Value>
// End of the added line.
<ZIndex>27</ZIndex>
...
Existing code 20...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Invoiced_Quantity_.Value)</Value>
// End of the deleted line.
<ZIndex>26</ZIndex>
...
Replacement code 20...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Invoiced_Quantity_.Value)</Value>
// End of the added line.
<ZIndex>26</ZIndex>
...
Existing code 21...
</Style>
// Delete the following line.
<Value>=Sum(Fields!Item_Ledger_Entry__Cost_Amount__Expected__.Value)</Value>
// End of the deleted line.
<ZIndex>25</ZIndex>
...
Replacement code 21...
</Style>
// Add the following line.
<Value>=Last(Fields!Item_Ledger_Entry___Cost_Amount__Expected__.Value)</Value>
// End of the added line.
<ZIndex>25</ZIndex>
...
Existing code 22...
</Field>
// Delete the following lines.
<Field Name="Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065Format">
<DataField>Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065Format</DataField>
// End of the deleted lines.
</Field>
...
Replacement code 22...
</Field>
// Add the following lines.
<Field Name="Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065">
<DataField>Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065</DataField>
</Field>
<Field Name="Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065Format">
<DataField>Item_Ledger_Entry__Quantity____Item_Ledger_Entry___Invoiced_Quantity__Control1040065Format</DataField>
</Field>
<Field Name="Item_Ledger_Entry__Quantity_Control1040066">
<DataField>Item_Ledger_Entry__Quantity_Control1040066</DataField>
// End of the added lines.
</Field>
...
Existing code 23...
</Field>
// Delete the following lines.
<Field Name="Item_Ledger_Entry___Invoiced_Quantity__Control1040067Format">
<DataField>Item_Ledger_Entry___Invoiced_Quantity__Control1040067Format</DataField>
// End of the deleted lines.
</Field>
...
Replacement code 23...
</Field>
// Add the following lines.
<Field Name="Item_Ledger_Entry___Invoiced_Quantity__Control1040067">
<DataField>Item_Ledger_Entry___Invoiced_Quantity__Control1040067</DataField>
</Field>
<Field Name="Item_Ledger_Entry___Invoiced_Quantity__Control1040067Format">
<DataField>Item_Ledger_Entry___Invoiced_Quantity__Control1040067Format</DataField>
</Field>
<Field Name="Item_Ledger_Entry___Cost_Amount__Expected___Control1040068">
<DataField>Item_Ledger_Entry___Cost_Amount__Expected___Control1040068</DataField>
// End of the added lines.
</Field>
Existing code 24...
</Field>
<Field Name="Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069Format">
------
Replacement code 24...
</Field>
// Add the following lines.
<Field Name="Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069">
<DataField>Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069</DataField>
</Field>
// End of the added lines.
<Field Name="Item_Ledger_Entry___Cost_Amount__Expected______Value_Entry___Cost_Amount__Actual___Control1040069Format">
---------