COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: avuong6 on 14 Sep 2015 03:03:38 PM

Title: crosstab hidden columns dont align to header
Post by: avuong6 on 14 Sep 2015 03:03:38 PM
i have a cross tab with multi line header, see image. i have prompts that will hide the selected columns when the user chooses. from my image, user can choose to hide red columns, blue columns, or both red and blue columns. logic works fine. my issue is when the columns hide, the green area shrinks from the the hidden columns, but my column headers on top do not shrink accordingly causing headers to miss align. purple area does not shrink. how do i get headers to adjust with the the change in width of the section below?

Title: Re: crosstab hidden columns dont align to header
Post by: Francis aka khayman on 15 Sep 2015 03:28:15 AM
put 2 extra blank columns in your header. permanently hide one of them. the other one is gets hidden, only if you hide two columns
Title: Re: crosstab hidden columns dont align to header
Post by: avuong6 on 15 Sep 2015 09:03:38 AM
sorry for being a bit slow, but i dont understand what you are suggesting. add 2 blank columns to header as i have indicated in image attached. then permanently hide 1 of them. wont this cause my header to be off center? see the purple box in the image. this text needs to be centered across 4 cells beneath it. can you please provide some more detail on how this will work?
Title: Re: crosstab hidden columns dont align to header
Post by: Michael75 on 15 Sep 2015 01:16:19 PM
Hi Avuong,

Based on your request, and your crosstab.png attachment, I'd suggest a solution based on conditionally displaying different headers, with fixed column widths, depending on the user selection. This solution is _not_tested_ , but since you already have the logic in place for:

- showing all columns
- hiding red columns
- hiding blue columns
- hiding both red and blue columns

it should be easy for you to try out. I'll refer to your first two headers ParamDisplay and Columnx Rate Type as Hdr1 and Hdr2. Steps are as follows:

- Decide on and apply fixed column widths for your three sets of four columns
- Set the column widths of the three grouped column headings appropriately in your base (show all columns)  Hdr1 and Hdr2

If column width of red columns and blue columns is the same, the following needs to be done only once. If not, twice.

- Copy Hdr1 and Hdr2, with width suitably adjusted for the absence of one column

In all cases

- Copy Hdr1 and Hdr2 again, with width adjusted for the absence of both red and blue columns
- Apply your conditional display logic to all versions of Hdr1 and Hdr2, so that only one pair displays for a given user selection

Let us know how you get on with this.

Good luck
Michael
Title: Re: crosstab hidden columns dont align to header
Post by: Francis aka khayman on 15 Sep 2015 09:03:05 PM
sorry a similar report that we have involved master detail of list + crosstab. not worth the effort.

let us take another approach.... conditional block, three crosstabs. display the crosstab depending on the prompt value user choose.