COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: vivek_cyno on 29 Sep 2012 07:53:11 AM

Title: What is the use of Singleton...
Post by: vivek_cyno on 29 Sep 2012 07:53:11 AM
Hi,

I hear lot of different answers.,

Can someone tell me the exact use of Singleton with an example please.

Thanks!
Title: Re: What is the use of Singleton...
Post by: tjohnson3050 on 29 Sep 2012 05:44:47 PM
A singleton is a data container that returns a single data item without anything else.  For example, lets say you have an executive summary report showing Revenue by quarter by division in a chart, but at the top of the report, they wanted a summary that just said:

Total Sales this Period: $5,456,000

A singleton will allow you to put the total sales number without showing any column headers or row headers.
Title: Re: What is the use of Singleton...
Post by: vivek_cyno on 02 Oct 2012 02:49:41 AM
Thanks for your response.

Single value means it will show the top value? or is it possible to add two data item in one singleton?
Title: Re: What is the use of Singleton...
Post by: tjohnson3050 on 02 Oct 2012 08:24:00 AM
The top value, and it will only show a single value, not two.
Title: Re: What is the use of Singleton...
Post by: vivek_cyno on 03 Oct 2012 03:59:58 AM
Hi..sorry I am still not clear .sorry to be silly.

Singleton will just display the top value of a data item?

Ex": I have a data item Sales, when I add this sales data item to singleton will it display only the top value.
Title: Re: What is the use of Singleton...
Post by: blom0344 on 03 Oct 2012 07:35:41 AM
The singleton is meant to return a dataset of 1 dataitem and 1 value only, but it's definition should be exact to control the outcome. Total sales of a certain period fits the bill; only 1 value is ever returned..