COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: superdesi on 08 Nov 2017 09:00:49 PM

Title: Conditional formatting & master detail relationship
Post by: superdesi on 08 Nov 2017 09:00:49 PM
I have 2 queries,  query1 is from the report package tree and query2 is a sql pull of a table that is totally different.

The queries both have an address data item that returns the same data.  I created a list using a join of both queries and by using master detail relationship,  i linked both address data items, which only return data if those addresses match.

I want it to return data if the address doesn't match but then highlight the row or some other way of telling me that row has an address that doesn't match both queries.

I tried a detail filter instead of MDR and got no results.

Thanks
Title: Re: Conditional formatting & master detail relationship
Post by: MFGF on 09 Nov 2017 02:18:23 AM
Quote from: superdesi on 08 Nov 2017 09:00:49 PM
I have 2 queries,  query1 is from the report package tree and query2 is a sql pull of a table that is totally different.

The queries both have an address data item that returns the same data.  I created a list using a join of both queries and by using master detail relationship,  i linked both address data items, which only return data if those addresses match.

I want it to return data if the address doesn't match but then highlight the row or some other way of telling me that row has an address that doesn't match both queries.

I tried a detail filter instead of MDR and got no results.

Thanks

Hi,

Are the queries joined in the Query Explorer and the results of the join delivered into a new query? If so, why do you need to use a master/detail relationship in your report? Couldn't you just base your list on the query containing the results of the join?

If you have joined the queries in Query Explorer, have you tried changing the cardinality of the join to be optional (eg 0..n instead of 1..n or 0..1 instead of 1..1)?

You could then use a conditional format to highlight where the two address values do not match?

Cheers!

MF.
Title: Re: Conditional formatting & master detail relationship
Post by: superdesi on 17 Nov 2017 03:33:20 PM
Quote from: MFGF on 09 Nov 2017 02:18:23 AM
Hi,

Are the queries joined in the Query Explorer and the results of the join delivered into a new query? If so, why do you need to use a master/detail relationship in your report? Couldn't you just base your list on the query containing the results of the join?

If you have joined the queries in Query Explorer, have you tried changing the cardinality of the join to be optional (eg 0..n instead of 1..n or 0..1 instead of 1..1)?

You could then use a conditional format to highlight where the two address values do not match?

Cheers!

MF.
Hi there...

Just an update.  You were absolutely right. After changing cardinality.... It worked beautifully.

Thanks so much for ur help