Cognos Analytics

 View Only
  • 1.  Overwrite default highlighting colors in List cells

    Posted Mon June 15, 2020 12:43 PM
    Want to share Style elements used to highlight cells in List column.  When a cell is selected and highlighted borders  are too distracting.

    These are set by 

    :root {
    --RS-OUTLINE-SELECTION-COLOR: var(--P1-A70);
    --RS-SPEC-SELECTION-BG-COLOR: var(--P1-20);
    --RS-DATA-SELECTION-BG-COLOR: var(--P1-50);


    In report style, you can unset them to white/transparent color to remove those borders. I tried to do at td tag level; however, it was always overwritten by above html properties.


    If anyone have better solution to avoid higlighting borders when selected, please share.

    Thanks!


    ------------------------------
    Buddhi Gupta
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Overwrite default highlighting colors in List cells

    IBM Champion
    Posted Mon June 15, 2020 01:59 PM
    Hi Buddhi,

    insert HTML-item before the table 

    #idWorkareaPane td { outline: 1px solid red !important; }
    Changeing this to

    #idWorkareaPane td { outline: 1px solid #eee !important; }

    Makes it look "nicer" ... just quick and dirty hack for one report?

    Want to change it on any installation enterprise wide?

    Edit:
    <c11 installapath>/bi/pat/pat.css

    change:
    #idWorkareaPane *[_8g9="true"]:not([_vhc="true"]):not([specname="page"]):not([specname="pageBody"]):not([specname="pageHeader"]):not([specname="pageFooter"]):not(polyline)#idWorkareaPane *[_8g9="true"]:not([_vhc="true"]):not([specname="page"]):not([specname="pageBody"]):not([specname="pageHeader"]):not([specname="pageFooter"]):not(polyline){ outline: 3px solid var(--RS-OUTLINE-SELECTION-COLOR);}

    to

    #idWorkareaPane *[_8g9="true"]:not([_vhc="true"]):not([specname="page"]):not([specname="pageBody"]):not([specname="pageHeader"]):not([specname="pageFooter"]):not(polyline)#idWorkareaPane *[_8g9="true"]:not([_vhc="true"]):not([specname="page"]):not([specname="pageBody"]):not([specname="pageHeader"]):not([specname="pageFooter"]):not(polyline){ outline: 1px solid #ccc;}

    ​​We do this using bash, awk and sed all the time.

    Hope this helps ... let me know if not.

    Best regards,
    Ralf

    ------------------------------
    Ralf Roeber
    Managing Partner
    Amvara Consulting
    ------------------------------



  • 3.  RE: Overwrite default highlighting colors in List cells

    Posted Mon June 15, 2020 02:18 PM
    Thanks @Ralf Roeber for id field!

    I prefer to remove it completely since in list it's still creating blocks:-

    #idWorkareaPane td { outline: none !important; }​ 

    Is there any way to upload style file with above settings as extension as refer in reports? We are using cloud and want to minimize server level changes.

    ------------------------------
    Buddhi Gupta
    ------------------------------



  • 4.  RE: Overwrite default highlighting colors in List cells

    IBM Champion
    Posted Tue June 16, 2020 08:52 AM
      |   view attached
    Hello Buddhi,

    good to read that the proposed solution works for you.

    And thanks for coming back with a new question.

    >Is there any way to upload style file with above settings as extension as refer in reports?
    Yes. There is a "COMMON" perspective.

    Attached find a ZIP ... just change the css-file inside, reZIP and upload. This will create "AmvaraCommonCss" Extension which holds the CSS file. The css file is loaded when opening the browser to your Cognos portal. 

    Best regards,
    Ralf

    ------------------------------
    Ralf Roeber
    Managing Partner
    Amvara Consulting
    ------------------------------

    Attachment(s)

    zip
    AmvaraCommonCss.zip   1 KB 1 version


  • 5.  RE: Overwrite default highlighting colors in List cells

    Posted Fri September 11, 2020 05:46 PM
    Hi @Ralf Roeber,

    I tried to create Just common CSS using Extension with above example. It loads correctly in Environment (checked in Network Tab); however, I don't see ​it's applying the style on report.

    For now, I have put only below in the file:
    #idWorkareaPane td { outline: none !important; }

    When I apply style at report level, it works. 

    Thanks for any inputs!

    ------------------------------
    Buddhi Gupta
    ------------------------------