Oh Wow, thats exactly what I wanted. Now I want to see if we can take it a step further.
I selected several tables and linked them, and put the fields I wanted onto the report canvas. Then I copied that whole SQL statement and made a giant union. What I want to accomplish is a collection of Open orders and Order history that connects to the part number of our inventory master. so my sql looks like this now:
SELECT
V_ORDER_LINES."QTY_ORDERED", V_ORDER_LINES."PRICE", V_ORDER_LINES."COST", V_ORDER_LINES."MARGIN",
V_INVENTORY_MSTR."PART", V_INVENTORY_MSTR."PRODUCT_LINE", V_INVENTORY_MSTR."QTY_ORDER",
V_INVENTORY_MST2."QTY_MAXIMUM", V_INVENTORY_MST2."NAME_VENDOR"
FROM
"GlobalCMC"."V_ORDER_LINES" V_ORDER_LINES INNER JOIN "GlobalCMC"."V_INVENTORY_MSTR" V_INVENTORY_MSTR ON
V_ORDER_LINES."PART" = V_INVENTORY_MSTR."PART" INNER JOIN "GlobalCMC"."V_INVENTORY_MST2" V_INVENTORY_MST2 ON
V_INVENTORY_MSTR."PART" = V_INVENTORY_MST2."PART"
WHERE
V_INVENTORY_MSTR."PRODUCT_LINE" >= 'A1' AND
V_INVENTORY_MSTR."PRODUCT_LINE" <= 'N1' AND
V_INVENTORY_MST2."NAME_VENDOR" <> ''
UNION
SELECT
V_ORDER_HIST_LINE."QTY_ORDERED", V_ORDER_HIST_LINE."PRICE", V_ORDER_HIST_LINE."COST",
V_ORDER_HIST_LINE."MARGIN", V_INVENTORY_MSTR."PART", V_INVENTORY_MSTR."PRODUCT_LINE",
V_INVENTORY_MSTR."QTY_ORDER", V_INVENTORY_MST2."QTY_MAXIMUM", V_INVENTORY_MST2."NAME_VENDOR"
FROM
"GlobalCMC"."V_ORDER_HIST_LINE" V_ORDER_HIST_LINE
INNER JOIN "GlobalCMC"."V_INVENTORY_MSTR" V_INVENTORY_MSTR
ON V_ORDER_HIST_LINE."PART" = V_INVENTORY_MSTR."PART"
INNER JOIN "GlobalCMC"."V_INVENTORY_MST2" V_INVENTORY_MST2
ON V_INVENTORY_MSTR."PART" = V_INVENTORY_MST2."PART"
WHERE
V_INVENTORY_MSTR."PRODUCT_LINE" >= 'A1' AND
V_INVENTORY_MSTR."PRODUCT_LINE" <= 'N1' AND
V_INVENTORY_MST2."NAME_VENDOR" <> ''
The report is being grouped by V_INVENTORY_MSTR."NAME_VENDOR" and then by V_INVENTORY_MSTR."PART" so then the individual order lines make up the detail. But when I go to run the report I'm seeing duplicate groups. I have perform grouping on server enabled, and I tried running with and without selecting distinct records and I got the same results. Any thoughts as to why?