Re-posting to avoid any confusion...
My data is as follows:
Job_No Item_Code Type
4040 Paper ABC
4040 LT-05 XYZ
Note: Although Job_No = Sales_Order, it is not specified anywhere.
Now I want following Report output:
Sales_Order Amount Color_Code
4040 1000 05(Take last 2 digits of Item_Code where Type = XYZ and Job_No = Sales_Order)
How do I do this?