Is there a way to do this without doing a subreport?
I have two tables Orders & Order_Details
Some orders don't have details. Some do. Some of the order details I want to see in my report some i do not.
I want a group by Order then in the detail show the order details.
I've joined by left outer join to get the details. However,
I only want to show order details where [OrderDetail.Type]=1
I've tried to include in my select statement:
(isnull (Orderdetail.Type) Or [OrderDetail.Type]=1)
this returns only orders that have [Order_Detail.Type]=1
If there is a row of data for order detail, that type can only be 1 of 2 values. 0 or 1.
I can conditionally supress the detail if [Order_Detail.Type]<>1
but because the number of records returned is considerably higher this way than only those I really want, i'd wanted to see if anyone might have a cleaner solution.
ps the select statement above is a simplification the actual statement is
{ASSOCIATIONS.TABLE} = "ORDERS" and
{@Level 3} = "TEAM 32" and
{Order.Status} = 1.00 and
({OrderDetail.TYPE} = 1.00
or isnull({OrderDetail.Type}))
where the formula @level 3 is
select {TeamTable_4.DEPTH}
case 1: {TeamTable_4.NAME}
case 2: {TeamTable_4.NAME}
case 3: {TeamTable_4.NAME}
case 4: {TeamTable_3.NAME}
// this just brings back the Team 3 Name regardless of whether Team 3 is the lowest level of team hierarchy or next to lowest.
oh.. CR XI and SQL Server db.
I have two tables Orders & Order_Details
Some orders don't have details. Some do. Some of the order details I want to see in my report some i do not.
I want a group by Order then in the detail show the order details.
I've joined by left outer join to get the details. However,
I only want to show order details where [OrderDetail.Type]=1
I've tried to include in my select statement:
(isnull (Orderdetail.Type) Or [OrderDetail.Type]=1)
this returns only orders that have [Order_Detail.Type]=1
If there is a row of data for order detail, that type can only be 1 of 2 values. 0 or 1.
I can conditionally supress the detail if [Order_Detail.Type]<>1
but because the number of records returned is considerably higher this way than only those I really want, i'd wanted to see if anyone might have a cleaner solution.
ps the select statement above is a simplification the actual statement is
{ASSOCIATIONS.TABLE} = "ORDERS" and
{@Level 3} = "TEAM 32" and
{Order.Status} = 1.00 and
({OrderDetail.TYPE} = 1.00
or isnull({OrderDetail.Type}))
where the formula @level 3 is
select {TeamTable_4.DEPTH}
case 1: {TeamTable_4.NAME}
case 2: {TeamTable_4.NAME}
case 3: {TeamTable_4.NAME}
case 4: {TeamTable_3.NAME}
// this just brings back the Team 3 Name regardless of whether Team 3 is the lowest level of team hierarchy or next to lowest.
oh.. CR XI and SQL Server db.