Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  HTML column expressed as a hyperlink in either PDF or Excel report output?

    Posted Thu May 27, 2021 04:04 PM
    Hello, yes I'm new to Cognos.  I have a very simple report created, just a blank report that I am adding data fields to.  One of the columns I would like to have the output display as an HTML hyperlink in both an Excel spreadsheet and a PDF file.    I have been able to  have this happen but only when the report output is in HTML format which will not work for this particular report.  I have attempted to use, from Textual, 1.) Rich Text Item and 2.) Hyperlink and from Advanced, 3.) HTML Item.  The HTML item will work in HTML Output, but produces a blank column in PDF and Excel data.  The Hyperlink (from Textual) produces an output of the raw data that is not an HTML Hyperlink.

    Any suggestions would be greatly appreciated.

    ------------------------------
    Mike Robey
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: HTML column expressed as a hyperlink in either PDF or Excel report output?

    Posted Fri May 28, 2021 01:56 AM
    HI Mike,
    one solution for PDF output is the object "Hyperlink button". You can add plain url text to the object or get the link & text from a data item of your query. That's what I found quickly. The button is also active in Excel but I get an error when clicking on it. Might be an issue with my Excel here.


    Br
    Robert

    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    ------------------------------



  • 3.  RE: HTML column expressed as a hyperlink in either PDF or Excel report output?

    Posted Fri May 28, 2021 09:00 AM
    @Mike Robey Similar to @Robert Dostal solution, you can add an html item to the List and set the Source Type to either a static text or a data item value. Next set the URL Source -> Source Type to Report expression and set the expression to something like - 'https://www.google.com/search?q=' + [Query1].[Product line]

    I've attached a screenshot showing this and the report specification.​​

    ------------------------------
    DENNY NAREZNY
    ------------------------------

    Attachment(s)



  • 4.  RE: HTML column expressed as a hyperlink in either PDF or Excel report output?

    Posted Tue June 01, 2021 04:47 PM
    @DENNY NAREZNY  Thank you a million times + 1.  After a bit of manipulation and allowing the report writer to select the data values for me, and then adding the single quote to the front and end of the URL it finally worked for me. 
    I ended up setting both my Text Source and URL Source to Data Item Value and then picking the field I needed.  
    Thank you so very much for sharing, I really appreciate it.  I was really sure that I was not the only person in the world who had this requirement in a simple report.

    Next step, it is to figure out how to condense the hyperlink into the seven or eight digit account number and only have that display instead of the entire long URL.


    ------------------------------
    Mike Robey
    ------------------------------



  • 5.  RE: HTML column expressed as a hyperlink in either PDF or Excel report output?

    Posted Tue June 01, 2021 05:15 PM

    @Mike Robey - Glad it is working for you. To only show the eight digit account name. You can change the source type to data item value and set it to the account number data item. (I pointed to it in my previous post in the screenshot)

    But if that does not work, let me know.​



    ------------------------------
    DENNY NAREZNY
    ------------------------------