COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: theroc on 05 Mar 2007 02:11:28 PM

Title: I want it all.....
Post by: theroc on 05 Mar 2007 02:11:28 PM
Okay so I am working in a sales data base, I have a list of 200 parts, I want to get sales data....here is the trouble I only get back the parts that have sales is there a way I can get back all the parts so that the ones that have no sales show $0....I am still in Reportnet 7 any help would be great.....
Title: Re: I want it all.....
Post by: MFGF on 06 Mar 2007 03:28:47 AM
Hi,

Sounds to me like the relationship defined between your parts and sales data has been set up as an inner join (mandatory relationship), which means you are only seeing parts with sales.  As I see it, your options would be either:
a. Change the relationship in Framework Manager to be an outer join between parts and sales (ie the cardinality at the sales end of the relationship would be 0..n) then republish your package, or
b. Use a tabular set in Report Studio to emulate this.  The tabular set would need 2 tabular models below it - one retrieving parts and sales data, the other retrieving the parts with no sales, along with some calculations containing 0 to emulate the sales values, then these could be UNIONed by the tabular set and displayed in your report.

If you have the ability to use option a, it's going to give you more flexibility to easily write these kinds of reports in future.

Best regards,

MF.
Title: Re: I want it all.....
Post by: theroc on 12 Mar 2007 02:22:52 PM
Thanks, makes perfect sense. I am not able to do option A but I figure out along time ago you need to get creative. I tried plan B and it works like a charm. Thanks agian!