COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: kgl_m on 11 Feb 2009 01:25:24 PM

Title: Sectioned list - display column titles only at beginning of page?
Post by: kgl_m on 11 Feb 2009 01:25:24 PM
Hi, I have a simple list that I'm sectioning on a data item. However, I'm getting column titles repeating for each section, which is not the desired behavior.

Is it possible to get the column titles only once, at the beginning of the page and still have the list sectioned?
Title: Re: Sectioned list - display column titles only at beginning of page?
Post by: Rajaggopal on 12 Feb 2009 01:06:36 AM
Yes it is very much possible... This is what i did...

1. Prior to sectioning the list, sort the column based on which you are going to have to section.
2. Create the section.
3. Create a new data item in the inner list, and assuming you did an ascending sort on step 1, have the following expression.
QuoteMinimum( [Sectioned Data Item] for report)
4. Add this newly created data item to the properties of the list (otherwise you will get an invalid expression error).
5. Create a boolean variable and enter the following expression.
QuotePageNumber() = 1 and [Query1].[Sectioned Data item] = [Query1].[Newly created Data Item]
This way the list titles dont repeat for page 2 as well even if page 2 contained the first value of the sectioned data item.
6. Select the List Columns Title Style for the inner list and set the style variable to the boolean variable just created.
7. For "No" value of the variable conditionally format the title style to have Box Type as None.

Please see the screenies below to know if this is your requirement.
This is the first page of the report.
(http://www.piccdrop.com/images/1234422334.jpg)
This is the last but one page of the report.
(http://www.piccdrop.com/images/1234422381.jpg)
Title: Re: Sectioned list - display column titles only at beginning of page?
Post by: vijayab on 12 Feb 2009 08:21:44 AM
Hi Rajaggopal

I am using cognos 8.2 and I tried ur solution .It is not working with the Page number But as i remove Page number and put the condition as ..
[Query1].[Sectioned Data item] = [Query1].[Newly created Data Item]

then it works fine

as per my understanding Page number is not working correctly.....


thanx
:)
Title: Re: Sectioned list - display column titles only at beginning of page?
Post by: Rajaggopal on 12 Feb 2009 08:34:08 PM
Did it throw any errors to you? Coz i worked it out and then only posted the screenies in my post...
Title: Re: Sectioned list - display column titles only at beginning of page?
Post by: vijayab on 13 Feb 2009 02:57:33 AM
It's not throwing any error....
But don't kno why page number() function is not working ...

Tahnx,
vijayab
Title: Re: Sectioned list - display column titles only at beginning of page?
Post by: Rajaggopal on 13 Feb 2009 03:23:51 AM
not working as in? You are not getting the desired result or something?

What was the exact expression you used in your boolean variable when using PageNumber()?