Home
Analytics
Show image depend on parameter
natashenka
Hi! How can I show an image (logo) from specific location depend of parameter selected? We have a few different companies using the same report and depend on the company code they enter as a parameter they need to see their logo. We don?t have any info about images in database. I?ve tried to use URI, but it doesn?t like any type of expression apart from the straight path to the image. Can you PLEASE point me to the right direction??
Thank you
Find more posts tagged with
Comments
Virgil Dodson
Hi natashenka,
What version of BIRT are you using? In BIRT 2.2, Images from a URI can be made from an expression.
You can try something like this:
"
http://www.birt-exchange.com/themes/birt/images/"
; + params["imageParam"]
and then pass in the name of the image as a parameter.
natashenka
I'm using BIRT 2.2.1
What i need to do is create something similar to this :
if (params("company") == "A")
{
"file:///c:/myprojects/images/companylogo.jpg"
}else{
"file:///c:/myprojects/images/companylogo2.jpg"
}
And also i need to show relative path, sort of "../../images/companylogo2.jpg"
And at the moment i can't achieve it... may be my sintax wrong, or my logic...?
Thank you for any ideas!!
Virgil Dodson
Hi natashenka,<br />
<br />
I've uploaded an example that has a couple of different approaches to solve the problem of dynamically image location. You can download this from: <a class='bbc_url' href='
http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=324'>http://www.birt-exchange.com/modules/wfdownloads/singlefile.php?cid=2&lid=324</a>
;