If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Dynamic image based on user name

Started by Veronis, 19 Jul 2010 01:36:47 PM

Previous topic - Next topic

Veronis

Hey all :)

I'm making a few reports that require me to display an "electronic signature" image at the bottom of the report. This signature is literally a scanned copy of the person's signature in JPG or PNG format, and thus, this image file will change depending on which user completed the report.

I'm not really sure how to do this. Can anyone give me some direction?

In case the first paragraph wasn't clear, let's say there are two users, AMILLER and MSMITH. If MSMITH runs the report, the JPG signature image on the bottom of the report should be Mike Smith's signature (e.g., msmith.jpg). If AMILLER runs the same report the next month, then Allen Miller's JPG signature image (e.g., amiller.jpg) should be at the bottom instead.

I've got the "user name" field loaded into the query subject that's linked to the report in question, now all I have to do is figure out a way to input an image based on that user name.

CognosPaul

It's fairly simple.

Drag a singleton into the report. Set it to the query that has the username. Add the username to the properties of the singleton (in the properties list there is a row called Properties).

Drag an image into the singleton. In the image set the source type to Report Expression. Click on the ellipse on the next row and enter:
'../images/' + [Query1].[Username] + '.jpg'

I'm making a few assumptions there, but they're self explanatory.

Veronis

Awesome, thanks so much! It worked like a charm.