Cognos Analytics

Cognos Analytics

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

 View Only
  • 1.  Rendedring images from external servers

    Posted Sat May 10, 2025 04:43 PM

    Hi everybody

    We have a Cognos report that needs to render images from image files located in a external server (OpenPages server), so we use the following URL: https://cmpc-uat01.op.ibmcloud.com/grc/api/contents/' + [File Resource ID] + '/document'  to get the image and then include it in the report.

    This works fine when running HTML reports, but when running as a PDF report it hangs. Is there a bug related to this? Or is some configuration missing? 

    Thank you



    ------------------------------
    Diego Jose Urbaneja Pacheco
    ------------------------------


  • 2.  RE: Rendedring images from external servers

    Posted Sun May 11, 2025 05:35 AM

    PDF Rendering Limitations: Cognos often uses a different rendering engine for PDFs compared to HTML. Some external resources like images hosted via authenticated or dynamic URLs (like those from OpenPages APIs) might not render properly in PDF mode, especially if the renderer can't access the resource due to authentication, headers, or CORS restrictions.

    1. Authentication Issues: Is the OpenPages image endpoint protected by any authentication mechanism (e.g., OAuth token, session cookie, etc.)? HTML rendering may reuse your current browser session, but the PDF renderer runs as a back-end process and may not inherit those credentials - causing it to hang while trying to access the resource.

    2. Workaround Options:

      • Consider embedding images as base64 if you can preprocess them before the report is run.

      • Alternatively, use a report expression to pre-fetch and cache the image on a local or public image server accessible by Cognos during PDF rendering.

      • Another option could be to use Cognos bursting or scheduled jobs that insert static copies of images for PDF outputs.



    ------------------------------
    Mohamed Ghareeb
    ------------------------------



  • 3.  RE: Rendedring images from external servers

    Posted Wed May 14, 2025 05:16 AM

    In our case (v11.2.4) I have noticed that the PDF renderer does not support https. We then created a binding for port 80 (http) in the web server (IIS) and it worked.



    ------------------------------
    Roger Lewin All for One SE
    Senior Technical Consultant - Analytics
    All for One SE
    Dortmund
    ------------------------------