Quantcast
Channel: Pentaho Community Forums
Viewing all articles
Browse latest Browse all 16689

How do I implement this report?

$
0
0
Tables:
Purchase Order( order_id, product_id, quantity, Status)

Product(product_id, name)



The report we want is this:


select name,
(select qty from PurchaseOrder where product_id =a.product_id and order_id='AA001'),
(select qty from PurchaseOrder where product_id =a.product_id and order_id='AA002'),
(select qty from PurchaseOrder where product_id =a.product_id and order_id='AA003'),


(select sum(qty) from PurchaseOrder where product_id in ['AA001','AA002','AA003') as total
from product a


It should display a table of products, with the columns for each purchase order.
And it is better the font color is rendered according to the status (received, pending) of the order.

Thank you very much.



Viewing all articles
Browse latest Browse all 16689


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