COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: rajua99 on 10 May 2016 02:54:23 PM

Title: Singleton Issue
Post by: rajua99 on 10 May 2016 02:54:23 PM
Hello,

In my report i have 2 queries one for Current Year and one for Previous year. I created a joined query between those 2 queries.

I am using singletons in my report to display data from the combined query in a table format. The join between those 2 Queries is Company No, Segment Number.

If there is data for both Previous Year and current year for each segment then the Singleton is displaying data for that segment. If there is no data for the segment for a Previous Year then the Singleton is displaying zero for that segment for both current year and previous year.

When i say no data for that segment for Previous year that means there is no record in the database for that segment for previous year...

I need help on how to display data in the singleton for the current year even though there is no record for that segment for the previous year.

If i create list report i can see the data in the list report but not using Singletons from the combined Query.

Thanks in Advance
Raju


Title: Re: Singleton Issue
Post by: navissar on 10 May 2016 03:49:36 PM
I assume you have a good reason for working with singletons so I won't go into that.
You can  either define your join as an outer join or point each singleton at a different query (so skip the join).
Title: Re: Singleton Issue
Post by: rajua99 on 10 May 2016 09:22:48 PM
I am using Outer join in the Joins but still not working.

I am attaching the screen shot of the Join. Can you please let us know whether the outer join is right or wrong...

Thanks
Raju

Title: Re: Singleton Issue
Post by: sdf on 11 May 2016 12:33:59 AM
i think the prior suggestion sounds good, create the singletons out of different queries, then set the properties to this singletons.
Title: Re: Singleton Issue
Post by: rajua99 on 12 May 2016 12:15:47 PM
I can create singletons with multiple queries but the third singletons is the difference between Current Year-Prior Year.
So creating singletons with multiple queries will not solve my problem.

Can we create a single singleton from Multiple Queries?