Search code examples
pdfiframeembedcognos-10cognos-bi

Cognos PDF report not visible in iframe


I have embedded a Cognos Connection in a web page using an iframe. I can login to Cognos and run reports without any issue within the iframe. I didn't feel any difference to accessing cognos in a iframe to cognos running in a normal browser web page until I pick the report format to be PDF. The Pdf report cannot be seen with in the iframe but its HTML version can be seen.

For a fact I know PDFs can be shown in iframes. Can any one suggest what is going wrong here.

Cognos vesrion 10.2.1


Solution

  • The reason for the Cognos PDF report format was not displayed on the iframe was having the "sandbox" attribute.

    If you have "Sandbox" attribute added to the iframe that Cognos is embedded, even with all the Sandbox values are allowed, for example allow-scripts, allow-same-origin etc. still the PDF format of Cognos reports cannot be displayed.