Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Using HTML instead of uploading icons

    Posted 10/27/21 11:58 AM
    On the PM square site I found a usefull tip about using HTML instead of uploading icons. See link:
    https://pmsquare.com/analytics-blog/2021/7/12/top-7-cognos-tips-june-2021

    So I dropped 2 HTML items in a block:
    <style>@import url('https://fonts.googleapis.com/css?family=Material+Icons');</style>
    <span class="material-icons">arrow_circle_up</span>

    When I set the foreground color the icon has this color, but when the size of the icons does not change when I set the size of the block to for example 60px x 60px. It works when I change the html item to: <span class="material-icons" style="font-size:60px">arrow_circle_up</span>

    1) How can I change the color without changing the HTML item?
    2) I would also like to use this HTML icon as a drill-through, just like an uploaded image. Is this also possible?

    ------------------------------
    Thomas van der Meer
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Using HTML instead of uploading icons

    Posted 10/27/21 02:01 PM
    This works:
    1. Create a text item
    2. set the text to arrow_circle_down
    3. give it the name: material

    The HTML item that has the style should look like this:
    <style>
    @import url('https://fonts.googleapis.com/css?family=Material+Icons');
    span[lid*="material"]{
    font-family: 'Material Icons';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    }
    </style>

    When you run the report the style element will give every text item named "material" or "materialX" the material font. Style the text item any way you'd like. 

    in RS: 
    HTML Item:


    Running the report:


    The drill-through works perfectly here.



    ------------------------------
    Paul Mendelson
    ------------------------------