Question

We recently adopted Cognos for reporting and it has proven to work well in many situations. But now I am facing a problem that I consider weird, as most tools used for reporting support that. I have a table in the database where I store images as blobs. I wanted to display these images in my Cognos report to find out that it is not supported out of the box.

If the report format is in HTML, then the solution is to put an image control on the report and construct the URL to point to some web application that you made that accesses the database and returns the image when that URL is called (there may be other solutions but this is "A" solution I know of).

But in my case I use the PDF report format, and I searched all over the internet and I couldn't find anything that talks about it. So my question is, is there anyway to display blob images in Cognos PDF reports or is it not supported at all and there is nothing I can do about it? Does any cognos version support this or do I have no hope of having something like that?

P.S. I am using cognos 8.4.1.

Was it helpful?

Solution

I think you are out of luck since Cognos needs to read the images from disk when generating the PDF.

Here's some alternate solutions:

Try to extract the images you need from the database and write em to disk and then you can use Cognos to read the images from disk with tag or image tools from Cognos.

OR

Build a web service that act as an image but reads the data from database (proxy) so when the image is called in tag, the webservice returns the bytes from database. It could work though I never tried it. Worth a shot imo ;)

You can fin some example here :

  1. http://www.codeproject.com/Questions/466769/save-and-retrieve-some-online-image-in-database-us
  2. http://forums.aspfree.com/code-bank-54/create-webservice-retrieve-image-database-23738.html
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top