Cognos Analytics

 View Only
  • 1.  Hide properties pane of reporting tool by default

    Posted Thu August 29, 2024 07:29 AM

    Hi, 

    any chance to hide the properties pane of the reporting tool by default?

    Do i need an extension for this? Or can i control this behaviour by by modifying an application file?

    In the browser console i can hide it using this command: Application.SharedState.Set(null, "showProperties", false);



    ------------------------------
    Gerhard Lang
    ------------------------------


  • 2.  RE: Hide properties pane of reporting tool by default

    Posted Fri August 30, 2024 09:10 AM

    Hello Gerhard,
    what do you mean by « properties pane of the reporting tool » ?
    Is this the "Report object tool bar" that is displayed when running in full interactivity mode since version 11.2.3.

    We are interested in hiding it because there is no option to deactivate it like there is for the "on-demand tool bar".
    It is possible to apply javascript code using Custom controls but we cannot achieve the ideal result.

    Thierry DAVOINE.



    ------------------------------
    Thierry DAVOINE
    ------------------------------



  • 3.  RE: Hide properties pane of reporting tool by default

    Posted Mon September 02, 2024 03:19 AM
    Edited by Gerhard Lang Mon September 02, 2024 03:19 AM

    Helly Thierry,


    No, i mean the properties pane on the right area of the reporting tool. Please see post #5 wich includes a screenshot.
    But now i'm interested what you mean with "Report object tool bar" :-)
    In 11.2.x there is the on-demand toolbar (formerly known as the report object toolbar) when using interactive viewer. this can be disabled like discribed here.

    Or do you mean the main toolbar of the report-viewer with save, run, format and share options ?



    ------------------------------
    Gerhard Lang
    ------------------------------



  • 4.  RE: Hide properties pane of reporting tool by default

    Posted Sun September 01, 2024 10:02 AM

    Can you please clarify what you are trying to do?

    A user should be able to run the Report designer BUT not able to open Properties of any Object in the report?

    A screenshot would be useful.



    ------------------------------
    Andrei Istomine
    Open to work - anything Cognos
    https://www.linkedin.com/in/andreii/
    ------------------------------



  • 5.  RE: Hide properties pane of reporting tool by default

    Posted Mon September 02, 2024 02:58 AM
    Hi, 
    if you open the reporting tool, the properties pane on the right is opened by default. i just want that the pane is closed. i do not want to remove the properties pane, just change the default behaviour (open/closed).


    ------------------------------
    Gerhard Lang
    ------------------------------



  • 6.  RE: Hide properties pane of reporting tool by default

    Posted Mon September 02, 2024 05:19 AM

    Yes Gerald,
    it is indeed a question of the "Report object tool bar" which appeared in 11.2.x.
    But it not the same as the "on-demand tool bar".
    The "Report object tool bar" is added to the "On-demand tool bar" which can, in fact, be deactivated via the general Report options .
    My wish is to also deactivate this 2nd tool bar which "pollutes" our end-user html restitutions.
    Example with the 2 tool bars : ( it's a 12.0.3 viewer )

    Example without "On-demand tool bar" (desactivated in Report options) :

    See idea : CA-I-3861
    We tried to push it up further with the IBM Lab Advocate on this point ...

    We have succeded, with javascript, to make this toolbar invisible but that does not prevent us from having instead one white line at the top of our html reports.



    ------------------------------
    Thierry DAVOINE
    ------------------------------



  • 7.  RE: Hide properties pane of reporting tool by default

    Posted Mon September 02, 2024 07:02 AM

    OK, we also tried to hide the "Report object tool bar", which i prefer to call "application-bar" :-)

    A simple hack would be to modify the CSS of the report using an html-item:


    <style>

    #idWorkarea_Pane {
        margin-top: -40px;
        min-height: 100%;
    }
    #idWorkareaPane {
        min-height: 100%;
    }

    </style>

    But i renders the page and then removes the toolbar, which means for a very short time the toolbar is visible. Our users are ok with that, but there must be a better option. Is your js-solution regarding this issue better? Would it be maybe possible to share the code?

    Kind regards

    Gerhard



    ------------------------------
    Gerhard Lang
    ------------------------------



  • 8.  RE: Hide properties pane of reporting tool by default

    Posted Mon September 02, 2024 11:30 AM
    Edited by Andrei Istomine Mon September 02, 2024 01:50 PM

    The recommended solution is an Extension where you would simply call that Toggle.

    In newer releases ( C12 )  you should be able to control which User Roles/Groups it will be applied for.



    ------------------------------
    Andrei Istomine
    Open to work - anything Cognos
    https://www.linkedin.com/in/andreii/
    ------------------------------



  • 9.  RE: Hide properties pane of reporting tool by default

    Posted Wed September 04, 2024 09:12 AM

    Gerhard,

    You are right.
    In the IBM docs the term Report Object toolbar refers to the On-demand toolbar.
    My expression was wrong.
    For this 2nd application toolbar I just found a written reference: Reporting toolbar.

    Our need is to remove the latter from the reports consumed by end users.

    2 scenarios:
    1) execution via native portal:
          your code is correct it deletes the 1st line of the html page carrying the app.toolbar.

    2) execution via a parameterized URL:
          if your code is present in the report then do not forget to add &ui_toolbar=true at the end of the URL


    Without your code, it would therefore be enough to leave &ui_toolbar=false (default) provided that the report is only used in context 2)


    To just "whiten" the Reporting toolbar line we use a javascript which was provided to us by IBM a few years ago and which we adapted :

    define(function() {
    "use strict";
    function Control() {
    };
    Control.prototype.initialize = function(oControlHost, fnDoneInitializing) {
    fnDoneInitializing();
    };
    Control.prototype.show = function(oControlHost) {
        // Use brute force timed loop to check for their presence as Apptoolbar loaded after page load by ajax
        var loopCounter = 1;
        function timedLoop() {
            setTimeout(function () {
             //hide Apptoolbar
              var myDivs = document.getElementsByClassName('clsAppToolbar');
                for (var i=0; i<myDivs.length; i++) {
                      myDivs[i].style.display="none";
                };
                if (myDivs.length >0) { loopCounter = 10; } else { loopCounter++; }
                if (loopCounter < 10) { timedLoop(); }
            }, 250)
        }
        timedLoop();
    };
    return Control;
    });

    An expression in french : « échange de bon procédé »
    Thierry D.



    ------------------------------
    Thierry DAVOINE
    ------------------------------