I am working on a report which should show the information of an item, as well as its locations, the different warehouses and their current stock. Use SQL server with an openquery to get information from BaaN.
What I want to do is something similar to the image I'm attaching:
As you can see, the blue marks are a kind of header that groups the item number and the estimated quantity that is required of that item. Below that record, the information about the different locations and stock of that same item is displayed.
The problem I have, and that I really do not know how to achieve, is that the information I get from SQL is displayed in that format for me just pull it to my application.
The current query that I have, and that does not show the blue part is the following:
SELECT * FROM OPENQUERY
(am3p1, 'SELECT o.T$PDNO, REPLACE(o.T$SITM,'' '','''')T$SITM, o.T$CWAR, o.T$QUNE, o.T$CPES$1, w.T$LOCA, w.T$STKS FROM baan.tticst001305 o
INNER JOIN baan.twhinr140305 w ON REPLACE(o.T$SITM,'' '','''') = REPLACE(w.T$ITEM,'' '','''')
WHERE o.T$PDNO = ''2GE000632'' AND w.T$LOCA <> '' '' ORDER BY o.T$SITM, w.T$IDAT')