COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: gshilpa24 on 13 Dec 2012 12:47:09 PM

Title: Singleton
Post by: gshilpa24 on 13 Dec 2012 12:47:09 PM
Hi,

I have singleton used in one of my report. Can anybody let me know if there is another alternative way to drag an item other than singleton?

Thanks,
Title: Re: Singleton
Post by: blom0344 on 13 Dec 2012 01:32:59 PM
That is why singletons were introduced in version 8.3 (I believe). To be used at any place within a report. Specifically for that purpose..
Title: Re: Singleton
Post by: MFGF on 13 Dec 2012 03:27:47 PM
So true, Blom :) To answer the original question, there *are* other ways to do this. You could associate a query with the report page and drop an item onto the page. You could perhaps use a repeater rather than a singleton (for a single value). You could use a list (for a single value) and hide the headers and borders. Being honest, though, singletons make life easier than any of these other techniques.

I always call refer to a Singleton as a Valerie. Those who know me well will testify that my jokes are always awful, and often terrible :) To get this particular joke, you need to be British, more than 45 years of age, and a Blue Peter fan :)

MF.
Title: Re: Singleton
Post by: blom0344 on 14 Dec 2012 01:49:45 AM
I like the way you spell 'Blom'   ;)
Title: Re: Singleton
Post by: gshilpa24 on 14 Dec 2012 06:27:45 AM
Thank you for the reply. The concern is to check which one would increase the performance of the report. which one is feasible to use?
List or SIngleton or table cells.

Thanks,
Title: Re: Singleton
Post by: blom0344 on 14 Dec 2012 06:29:05 AM
I doubt you will find a difference in performance..
Title: Re: Singleton
Post by: gshilpa24 on 14 Dec 2012 06:48:46 AM
ok , Thank you.
Title: Re: Singleton
Post by: Gopinath on 17 Dec 2012 05:12:04 AM
Quote from: blom0344 on 14 Dec 2012 06:29:05 AM
I doubt you will find a difference in performance..

Blom,

My understanding is that, eventhough I have 1 query in my report and if I use a singleton(without checking all data items in 'Properties' property of the singleton) to display a data item from the query, cognos creates 2 different query internally(1 for singleton and the other for datacontainers in the report) .

Won't this degrade the report performance?

Expecting your valuable reply.



Title: Re: Singleton
Post by: blom0344 on 17 Dec 2012 06:19:27 AM
A singleton is meant to return ONE row and ONE dataitem. It's use totally differs from normal data queries. In normal cases you can therefore not 'reuse' the dataquery where you would need the singleton. Report performance depends not just on the effectiveness of queries, but also on possible local processing; layout , rendering etc
Title: Re: Singleton
Post by: Lynn on 17 Dec 2012 02:46:39 PM
Quote from: MFGF on 13 Dec 2012 03:27:47 PM
...

I always call refer to a Singleton as a Valerie. Those who know me well will testify that my jokes are always awful, and often terrible :) To get this particular joke, you need to be British, more than 45 years of age, and a Blue Peter fan :)

MF.

Well a quick google search helped me figure out the Valerie reference and might one day serve me well if I find myself involved in a pub quiz  8)

As for the performance question, I think a query that is referenced in more than one layout will result in more than one call to the database with the appropriate minimized SQL based on the data items referenced in each container.

To Blom's point, I would suggest a query be created specifically for your Valerie, err, I mean singleton, that is constructed to run optimally for it's purpose.
Title: Re: Singleton
Post by: MFGF on 18 Dec 2012 07:52:54 AM
Quote from: Lynn on 17 Dec 2012 02:46:39 PM
Well a quick google search helped me figure out the Valerie reference and might one day serve me well if I find myself involved in a pub quiz  8)

Good detective work there! For a star prize, what were the names of the other two on the show at the same time? :)

Quote from: Lynn on 17 Dec 2012 02:46:39 PM
To Blom's point, I would suggest a query be created specifically for your Valerie, err, I mean singleton, that is constructed to run optimally for it's purpose.

Yes - I concur.

MF.
Title: Re: Singleton
Post by: Lynn on 18 Dec 2012 07:56:08 AM
Quote from: MFGF on 18 Dec 2012 07:52:54 AM
Good detective work there! For a star prize, what were the names of the other two on the show at the same time? :)


Fred PromptMany and Christopher Crosstab?
Title: Re: Singleton
Post by: MFGF on 18 Dec 2012 08:00:45 AM
Quote from: Lynn on 18 Dec 2012 07:56:08 AM
Fred PromptMany and Christopher Crosstab?

Sigh. I can tell Christmas is coming. Have they started putting whisky in the tea at work? :)
Title: Re: Singleton
Post by: blom0344 on 18 Dec 2012 08:35:08 AM
Quote from: MFGF on 18 Dec 2012 08:00:45 AM
Sigh. I can tell Christmas is coming. Have they started putting whisky in the tea at work? :)

whiskey, no doubt
Title: Re: Singleton
Post by: MFGF on 18 Dec 2012 10:22:05 AM
Quote from: blom0344 on 18 Dec 2012 08:35:08 AM

whiskey, no doubt

Doh! Drattd kyboard!! ;)