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)
Map text to Image
shir
<p>Hi All,</p><p> </p><p>I am using BIRT RCP v4.3.1.</p><p> </p><p>In the report i have a table which displays the following data</p><p> </p><p>|OS_TYPE | HOST | CPU_Used %|</p><p> </p><p>the data set is from a orale DB, now i want to display an image in the first column, i.e.</p><p> </p><p>the OS_TYPE can have values either, "LINUX" or "WINDOWS", hence i need to display corresponding image instead of the text.</p>
Find more posts tagged with
Comments
micajblock
<p>Use a JavaScript on the image like this:</p>
shir
<p>Thanks Mica, however i did not exactly understand the solution. </p><p> </p><p>The table will have only Strings in first column. There is no image element on the report while designing.</p><p> </p><p>Do u mean to say that we put a hyperlink to a image file ?? please elaborate</p>
shir
<p>I tried with similar classic design , </p><p> </p><p>PFA rptdesign file</p>
micajblock
<p>which images do you want to use. I do not recommend using embedded images. Either a URL or in the resources. </p>
shir
<p>i have images stored in my local, i want to display Linux logo OR Windows Logo for respective text in the table first column.</p><p> </p><p>please suggest as how to go about it, appreciate of you could give some examples</p>
shir
<p>Hi I was able to recreate the scenario and correctly display the images, </p><p> </p><p>However will the images be shown when the design file is uploaded to some other server ?</p>
shir
<p>+ design file</p>
micajblock
<p>See my design file. It is using images in a resource folder. By default in the designer this is the root of the project. This can be changed in the preferences. On the server when you start the engine you can specify the location of the resource folder. </p>
shir
<p>my report is being run in remote apache server,</p><p>due to some reason, there are limitations to put images in shared resource directory. Only embedded image works, hence i did a work around.</p><p> </p><p>Added an extra column for images, put all the images that are in scope and put an expression in the visibility option for respective images,</p><p> </p><p>example for the 'Linux' icon, the visibility option is something like, --> `Hide` if (fx) row[OS_TYPE]='UNIX' || row[OS_TYPE]='WINDOWS'.</p><p> </p><p>This works nice as well.</p><p> </p><p>Thanks</p>
micajblock
<p>Glad it works. This will make the report document larger. as all images will be in the document for every row.</p>