COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Cognos Administration => Topic started by: Deep750 on 18 Mar 2014 03:11:48 AM

Title: Freeze panes in reports as default
Post by: Deep750 on 18 Mar 2014 03:11:48 AM
Hi,
Does anyone know if it is possible to set "freeze panes" as default, when running reports?

The problem is that the reports have many rows, and the client want the headers to be frozen as default.
Any suggestions would be appreciated

The client is on 10.2.1.1, with lates fix pack
Title: Re: Freeze panes in reports as default
Post by: nblank on 18 Mar 2014 04:43:44 AM
I found this article/pdf: http://www.ibm.com/developerworks/library/ba-pp-infrastructure-cognos_specific-page641/ba-pp-infrastructure-cognos_specific-page641-pdf.pdf (http://www.ibm.com/developerworks/library/ba-pp-infrastructure-cognos_specific-page641/ba-pp-infrastructure-cognos_specific-page641-pdf.pdf)
Title: Re: Freeze panes in reports as default
Post by: nblank on 18 Mar 2014 04:47:57 AM
In the PDF it says:

"IBM Cognos 10.2 introduced a freeze column and row headers feature in IBM Cognos Viewer.
Therefore this technique only benefits users of earlier versions of IBM Cognos BI."


So the solution might be closer than you think.
Title: Re: Freeze panes in reports as default
Post by: MFGF on 18 Mar 2014 07:06:10 AM
Hmmm. Interesting. I have seen this feature in a Cognos Workspace widget but not natively in the Cognos Viewer. I wonder if that's what the document is alluding to?

MF.
Title: Re: Freeze panes in reports as default
Post by: bdbits on 18 Mar 2014 10:49:10 AM
I did not know that was there now, either. But I just used it in Cognos Connection with the generic report viewer. Just right-click on the report object, e.g. the crosstab. It is on the context popup menu, you can freeze rows and/or columns. Sweet.
Title: Re: Freeze panes in reports as default
Post by: Deep750 on 19 Mar 2014 03:12:08 AM
Quote from: nblank on 18 Mar 2014 04:43:44 AM
I found this article/pdf: ...
This might work, but I was thinking of a global option, so it works for all reports. The suggestion has to be implemented into all reports...a lot of work.
Title: Re: Freeze panes in reports as default
Post by: bdbits on 19 Mar 2014 09:21:55 AM
Deep750, nblank pointed out in the very next post that the feature is now built into Cognos, and you stated that you (or your client) are on the latest version. Right-click in the report object and the user gets the option to freezer rows/columns with zero effort on your part.

The only thing I can see missing is making it the default. I googled a bit and it does not seem there is a way to make it global. You might be able to create Javascript to turn it on by tracing what happens from the context menu. If so, you might then be able to make it a layout component and just drop it on each report where you want it the default. It's an idea, but a lot of effort if the user will be satisfied having the option to enable it themselves when desired.
Title: Re: Freeze panes in reports as default
Post by: Deep750 on 20 Mar 2014 03:01:59 AM
Thank you for your response.
I have advised my client to use built in functionality, i.e. right click to freeze panes.

The difficulty with that is to tell the users about the functionality.

Do anyone know/or can make a script to call this functionality, so we can add a button - so we don't have to tell all the users how to freeze panes?
Title: Re: Freeze panes in reports as default
Post by: CognosPaul on 20 Mar 2014 06:41:59 AM
Got it. That was annoying, the lid of an object includes the namespace, so if an object was named Crosstab1, then the lid would be Crosstab1RS from Report Studio and Crosstab1_NS_ from the connection. For some reason, the freeze functions actually needs the lid stripped of the namespace name.

Place the following script after the crosstab or list, Remember to set it to show all of the rows, and set "Page break by data container" (under file -> report properties) to Yes.

<script>
var paulScripts = {};
paulScripts.oCV = window['oCV'+'_THIS_'].getRV().getCV();

paulScripts.freezeContainer = function(objectName){
  setTimeout(function(){
    paulScripts.oCV.getPinFreezeManager().freezeContainerRowHeadings(objectName);
    paulScripts.oCV.getPinFreezeManager().freezeContainerColumnHeadings(objectName);}
  ,200);
};

paulScripts.freezeContainer('List1');
</script>
Title: Re: Freeze panes in reports as default
Post by: bdbits on 20 Mar 2014 04:32:16 PM
CognosPaul is the definitive Cognosman. Sort of like Superman, but more intelligent.  8)

I think I will add this to my toolbox of components (with credit in comments of course).
Thanks!