Showing posts with label Singleton. Show all posts
Showing posts with label Singleton. Show all posts

Wednesday, May 23, 2012

Defect - Duplicate Queries generated by Cognos

I seem to be on a ride running into numerous defects over the last couple of months. The latest one being similar duplicate queries generated by Cognos in a particular scenario.

As can be seen from the screenshot, Cognos generates 2 queries with no differences and both having the same name.




This happens in the below scenario:

When you have a singleton object before all other Objects in the report.
And when you have Prompt Macro as the first filter in the first object of the report.

And if you have value prompts after the singleton but before the first chart/list/crosstab object, then these queries get duplicated as shown below:


When each query counts towards performance, this isn't good.

So the work-around is to have a Required prompt without macros as the first prompt in a list/crosstab/chart object. If one doesn't exist create a dummy required filter to get around-this.


Sunday, February 7, 2010

Use Singleton to display data when there is no data in Report Page Query

In a report that was migrated from Cognos 8.2 to Cognos 8.3, I noticed that when there was no data in the report page, there was no data getting displayed for other queries in my report page. I have 2 queries being used in the report page - one for the main list report and another to return the user name using a macro. Now when no data was returned by the main query my user name was also not getting displayed. The user name was being displayed by a list with no borders and formatted to look like a singleton object as this was developed using 8.2. Now to rectify this I used a singleton object instead of the list and it worked fine.