how to display an image from a blob in a pdf in cognos - cognos

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.

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 :
http://www.codeproject.com/Questions/466769/save-and-retrieve-some-online-image-in-database-us
http://forums.aspfree.com/code-bank-54/create-webservice-retrieve-image-database-23738.html

Related

Excel Mobile Data Entry Form

I am trying to create a data entry "app" to collect daily readings across our site. Here are the three biggest constraints:
Software - ideally, we would use some software within the Microsoft 365 Suite, mainly because those are the only approved apps on site. It may be possible to use open source software, but that might raise some flags in terms of security. So my thoughts are to use either Excel or Access.
Cost - ideally, we do not want purchase any additional software licenses. I would try and create something with Power Apps, but we do not have the licensing for an Azure or SQL server to store the data. I could be missing something here though.
Mobile-Friendly - finally, it needs to work on an Android tablet. Currently, we collect readings using pen and paper. The whole idea of this is to move towards using a tablet.
The easiest approach would be to create an Excel spreadsheet, save it on OneDrive, and edit the spreadsheet. I don't love this option because we are collecting 100's of data points each day. This would end up with a very wide spreadsheet that will be cumbersome to navigate.
The other option I looked into was creating an Access database and accompanying form and storing it on SharePoint. However, it seems Microsoft has stopped supporting Access databases on SharePoint.
I have created data entry forms using VBA, similar to this, but these do not work on mobile.
Is it possible to create a data entry form in Excel that also works on the Android version of Excel? Are there other alternatives I am not thinking of?
I am engaged in just this kind of project also. I have written an app in PowerApps, built an Excel spreadsheet and stored it in OneDrive, and am running it (the app) on an iPad. The design differs somewhat from your description of directly presenting a spreadsheet to the user (which I think PowerApps could do) because I don't want users having direct access to the data.
Edit: You do not need Azure or SQL, unless you are storing tons of data. Excel can be a satisfactory data storage location for modest uses.
I found the learning curve for PowerApps to be quite steep, as it's a different paradigm than line-by-line coding.
I think this is a more user friendly way to collect data than trying to run an Excel form, and once you get it made and polished, you'll look like a pro :)
I am by no means an expert but if you need some tips I'll do what I can to help. It sounds like we are at similar developmental stages.
Is it possible to create a data entry form in Excel that also works on the Android version of Excel? Are there other alternatives I am not thinking of?
Microsoft Forms does the job when created from OneDrive on mobile browser. Side note: the form I just created and the response I submitted have now disappeared from my OneDrive.
I also saw some people using Power Automate to save responses from a form into an Excel file (every reponse).

Docx preview with Google & Microsoft

In this question, there is a proposed solution to preview the Word files with Google and Microsoft viewers. Both solution work pretty well, but there is a restriction for this project that the documents can't leave Europe.
I am wondering the following questions:
Does Google/Microsoft store the files on their server after they have downloaded it? I see that the file download does not happen in the browser, but in both cases it is served as image.
If the request is from Europe, is the document processed on European servers? And if no, is it possible to somehow influence it?
Here are the examples for the convenience:
https://docs.google.com/gview?url=https://omextemplates.content.office.net/support/templates/en-us/tf10002117.docx
https://view.officeapps.live.com/op/embed.aspx?src=https://omextemplates.content.office.net/support/templates/en-us/tf10002117.docx
PS: in case it is relevant, the document itself is stored in Google Storage European region.

Sharepoint - Link to a file that is updated Dynamically?

I'm hoping this is possible.
The organization I work for has a Sharepoint site and I am able to Upload Files to pages, however I am not an admin on our Sharepoint. I'm not sure what the version is, I think its older (ie: 2005).
I have some Excel Reports I've built. The data for these reports is pulled from a SQL Server Database which I have full control over. I have setup a Job in SQL Server to run every 12 minutes, this procedure pulls in some data and updates a few tables. These tables are used to feed my Excel Reports.
I have a separate Scheduled task set to open my excel report(s) refresh the data connections and save as a PDF.
I would like to link to these PDF Files via our Sharepoint so that the VIPs can access the reports as they want, but they always see the most up to date report.
I was trying to link to a Shortcut to the PDF Files but SharePoint doesn't seem to like that. How do I make the SharePoint link point to the PDF File that is saved over every 15 minutes?
Thanks in advance,
Any insight is greatly appreciated.
The way I do it (newish version of Sharepoint) is make the save location for the PDF the network location where Sharepoint keeps the files for that site. Usually you'll have access to those if you can edit the Sharepoint site.
Here is a tutorial to find that network location.
EDIT: It very well may be disabled by the admin at the moment. But it looks like the functionality is there.
Given the age of your SharePoint (either 03 or 07), most of the modern tools that you could use to do this don't exist for you (Excel reporting, BI tools, etc). The easiest solution I can think of is to actually modify the other side of the equation. A few options:
Change your report to output two copies of the same file. One entitled (as an example) currentreport.xls and the other report20150626.xls . Put the link to the currentreport.xls in SharePoint.
Build an ASP.net page that runs the SQL query you have built and pull the data through a view. Since this would be pulled on demand, it may be a few more cycles of your SQL code, but indexing, caching and selective data pull can prevent this from being an issue. Put the asp.net code in an iFrame in a SharePoint content editor web part.
Build your report using SSRS and host the output of that in SharePoint using an iFrame.
Run a scheduled job in SQL that copies your current report data to a table and query that table instead of your normal report table. That way you only have one Excel file that points to a specific table so no need to update links. You can always keep copying data to specific files if you need a historical record and can't use the DB to store this data for you (though the amount of space that it would take to do so would be minimal).

Preview or Embed on a web page an Excel document stored in Azure Blob

I was wondering if it is possible to open an Excel file (or any Office file) stored on an Azure Blob account within a browser or, better yet, embedded on a web page. Kind of like a preview function instead of always prompting the user to download the file. I know this could be easily done by storing the file in Sharepoint or OneDrive and using it's embed functionality but I'm trying to steer clear of those since we already implement the blob storage.
I've been searching but most results only lead me to Sharepoint/OneDrive.
Any help would be appreciated. :)
Edit (2014-07-14)
As per RGregg's suggestion below, I tried looking into creating a custom WOPI Host and I do think it would perfectly fit what I need. But I think I'm missing something. I cannot get the preview running. I am always getting a "Server not found" error. I tried replacing the old discovery file directed at owa1.wingtip.com with officeapps.live.com/hosting/discovery and it now goes as far as the loading image of Word Online but it gets stuck there. Couldn't really find other materials that expounds on how to make it work and it doesn't show any error whatsoever.
I also tried to create my own (in an attempt to simplify everything with just the mere basics) by implementing the GetFile and CheckFileInfo methods required. It sucessfully retrieves the file and the info but I still can't integrate it with the Web Apps. I think I'm missing a big chunk of something but I can't really figure it out. :(
I think it'd be easier to convert your backend over to Office 365 or OneDrive than to make your blob storage solution work with the Office apps, but I think what you would need to do is implement a WOPI host, like in this article: http://code.msdn.microsoft.com/office/Building-an-Office-Web-f98650d6. That would at least get you to a point where Excel Web App could load files from your blob storage.
I've just recently found out about Google Doc Preview. Basically, you'll just need an online URL of your document and appended it to:
https://docs.google.com/viewer?url=
and put that in an iframe. For wholeness:
<iframe src="http://docs.google.com/viewer?url=http://<blobServer>/<filename>&embedded=true" width="600" height="780" style="border: none;"></iframe>
It already provides some sort of a "Print Preview" on an IFrame so you have to keep in mind of pagination when creating the document for a prettier view. It also doesn't require you to have any google account to access it.
I still have some issues with it though:
Security. No required account = less security.
Doesn't render charts well. I had a pie chart and it appears as one whole solid circle.
Doesn't render filters at all thus...
Doesn't provide interactivity unlike OneDrive's embed.
But, this still answers the question so I'm posting it here for anyone looking for a solution. :)
Any answers are still welcome. :)

Cognos Reports - How set icons on control objects?

Recently I've started to create some active reports and I'm having some troubles to put a icon into my data control objects. I mean the icon on the picture below:
Thanks in advance.
Best regards.
Cognos is expecting a list of URLs to images in this case. Be sure to use the full URL, not relative (see IBM doc). Data-driven means it needs to come from a database, not be hard-coded.
I'd also suggest bookmarking the official IBM Active Reports cookbook for reference.

Resources