Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  RTF content in reports

    Posted Fri November 17, 2023 10:45 AM

    Hi,

    I have RTF content stored in SQL Server database. I would like to put it in a report to recover the layout of the initial document.
    For this I thought of using the RTF object from the toolbox, unfortunately the report displays the content without the layout:


    I expected this:


    Is there a way to retrieve RTF content with its own formatting?

    Thanks, Jerzy



    ------------------------------
    Jerzy Konarski
    ------------------------------


  • 2.  RE: RTF content in reports

    Posted Mon November 20, 2023 03:41 AM

    Hi Jerzy,

    Only a few elements are supported in rich text items (RTF): https://www.ibm.com/docs/en/cognos-analytics/12.0.0?topic=report-elements-supported-in-rich-text-items

    I believe there is no new feature with RTF since Cognos BI v10.2.x.

    You could have the following code in your database:

    <html>
    <p>Line 1</p>
    <p>Line 2</p>
    <p>Line 3</p>
    </html>

    Best regards,



    ------------------------------
    Patrick Neveu
    Collaboration Betters The World (CBTW)
    IBM Champion
    ------------------------------



  • 3.  RE: RTF content in reports

    Posted Tue November 21, 2023 06:22 AM

    Hi Patrick,

    It doesn't really work :(. I have to replace the RTF tags with html tags, "by hand". Not a great solution. So I wonder what the RTF control is for in report studio.

    jerzy



    ------------------------------
    Jerzy Konarski
    ------------------------------



  • 4.  RE: RTF content in reports

    Posted Wed November 22, 2023 03:33 AM

    Hi Jerzy,

    The RTF control was created to be able to use the supported elements within a PDF output. HTML control is only available with a HTML output.

    Best regards,



    ------------------------------
    Patrick Neveu
    Collaboration Betters The World (CBTW)
    IBM Champion
    ------------------------------



  • 5.  RE: RTF content in reports

    Posted Wed November 22, 2023 04:48 AM

    Hi Jerzy,

    the RTF Icon was implemented on my request back in 2004, 2005.

    And yes, my original idea was to be able to add information from the database or "..." to the report that will be 100% well formatted, pixel perfect.

    It was implemented a little different as thought. Developer creativity :-) If I remember it right, Craig implemented this.

    So, as to my knowledge we now find a basic formatting / interpretation of the RTF features.

    And, yes it should work as documented to be able to insert XHTML with css-style formatting into your report.



    ------------------------------
    Ralf Roeber
    https://linkedin.com/in/ralf-roeber/
    ------------------------------



  • 6.  RE: RTF content in reports

    Posted Tue November 28, 2023 03:51 AM

    Finally I "decode" the RTF tags with the replace function. It's a bit laborious and not very optimized, but it works.
    THANKS,Jerzy



    ------------------------------
    Jerzy Konarski
    ------------------------------