BIRT Exchange Forum: dynamic image size - BIRT Exchange Forum

Jump to content


 

No Latest Open Poll.

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

dynamic image size based on xml property Rate Topic: -----

#1 User is offline   bvanvelsen Icon

  • Newbie
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 10-November 11


Posted 29 February 2012 - 02:12 AM

Hello

I am trying to dynamically set the height of an image, I hoped this would be possible in the General tab of an element. But there I can only set a fixed size in px, in, %, etc... Is it possible to define a width or height there based on an xml attribute from my datasource? And also this scripting thing does not work when rendering to PDF, then it won't even show the images anymore, it works only when using the web viewer...

I was able to workaround this issue by using an onRender script and using the following script:
if(row["size"] == "SMALL") {
	this.height = "50";
}
if(row["size"] == "MEDIUM") {
	this.height = "150";
}
if(row["size"] == "LARGE") {
	this.height = "250";
}


I can do something like this outside a script? or how can I use this with scripting but with PDF
0

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users