Skip to main content



      Home
Home » Archived » BIRT » Show image depend on parameter
Show image depend on parameter [message #262588] Mon, 03 December 2007 23:54 Go to next message
Eclipse UserFriend
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
Re: Show image depend on parameter [message #262597 is a reply to message #262588] Tue, 04 December 2007 01:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

Natasha wrote:
>
> 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
>
>

Natasha,

There are a couple of different ways to do this. The easiest way is
probably to add a bit of script into the images onRender event to change
either the URL or the embedded image name based on the value of that
parameter. Below is a snippet from the onRender method to change which
embedded image of a report is used based on the value of a parameter.

John

if (params["NewParameter"] == 1)
{
this.setImageName("classicCarsLogo.jpg");
}
else
{
this.setImageName("unitTests.jpg");
}
Re: Show image depend on parameter [message #262974 is a reply to message #262597] Sun, 09 December 2007 19:13 Go to previous messageGo to next message
Eclipse UserFriend
Thank you!
i need to show relative path, sort of "../../images/companylogo2.jpg"
which doesn't work for some reason...
also, i need this image as logo on Master page. what do i need to do when
i place logo? if i choose image URI, showld i shoul path to one of the
image and script will change it to another image?

Thank you!!
Re: Show image depend on parameter [message #263000 is a reply to message #262974] Mon, 10 December 2007 07:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

Natasha,

The same logic applies. Instead of using setImageName, you can use the
setImageURI method. It should work in the Master Page as well. Let me
see about putting together a tutorial on how to do this since I already
have the example sitting here.

John

Natasha wrote:
> Thank you!
> i need to show relative path, sort of "../../images/companylogo2.jpg"
> which doesn't work for some reason...
> also, i need this image as logo on Master page. what do i need to do
> when i place logo? if i choose image URI, showld i shoul path to one of
> the image and script will change it to another image?
>
> Thank you!!
>
Re: Show image depend on parameter [message #263017 is a reply to message #263000] Mon, 10 December 2007 16:35 Go to previous messageGo to next message
Eclipse UserFriend
Thank you!!!! Tutorial would be so fantastic!!
Re: Show image depend on parameter [message #263044 is a reply to message #263017] Tue, 11 December 2007 00:38 Go to previous message
Eclipse UserFriend
Originally posted by: johnw.innoventsolutions.com

Natasha,

The link to the tutorial is below:

http://digiassn.blogspot.com/2007/12/birt-dynamic-images.htm l

John

natasha wrote:
> Thank you!!!! Tutorial would be so fantastic!!
>
Previous Topic:data in master page
Next Topic:usage of resources
Goto Forum:
  


Current Time: Tue Jul 22 22:55:42 EDT 2025

Powered by FUDForum. Page generated in 0.19363 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top