Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
dynamic image size
bvanvelsen
Hello<br />
<br />
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...<br />
<br />
I was able to workaround this issue by using an onRender script and using the following script:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>if(row["size"] == "SMALL") {
this.height = "50";
}
if(row["size"] == "MEDIUM") {
this.height = "150";
}
if(row["size"] == "LARGE") {
this.height = "250";
}</pre>
<br />
I can do something like this outside a script? or how can I use this with scripting but with PDF
Find more posts tagged with
Comments
There are no comments yet