Hi everyone, I'm gonna kind of crazy. I think I've searched the whole web for a solution of my problem. Unless, if I'm generating a normal html file the script is working but if I'm copying the code into the BIRT Designer it doesn't work.<br />
<br />
So here is my problem...<br />
<br />
I'm generating a report. On top of the report there is a grid, on the left side of the grid there are some customer informations and on the right side should be a picture of the product. So far so good.<br />
First problem with the picture is, that I can't use the normal image item from BIRT because the image is stored on a server but I don't have the possibility to extract the whole URI like "
http://.../pciture.jpg"<br />
<br />
Therefor I'm using a text item with JScript. The text item is binded to a dataset in which an SQL-Statement is executed and this statement returns me an integer.<br />
Now if the result of the Statement returns null, the JScript in the text item should show me a standard image of the company in the report, otherwise if the result returns a value, it should show me the image with the specified number. As I told you, if I'm working with an editor for html the script is running as desired, only if I'm copying it in BIRT the image isn't shown.<br />
<br />
Got anyone an idea? I hope you can follow the description.<br />
<br />
And here comes the code:<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
<script language = "JavaScript" type="text/javascript">
function checkid (id) {
if (id != null) {
document.write('<iframe src="http://.../.../download.do?id=<value-of>row["resource_id"]</value-of>" name="Produktbild" scrolling="no" width="640" height="480" align="center" frameborder="0" alt="Produktbild"></iframe>');
}
else {
document.write('<iframe src="http://.../.../download.do?id=1" name="Produktbild" scrolling="no" width="640" height="480" align="center" frameborder="0" alt="Produktbild"></iframe>');
}
}
</script>
<body onload="checkid('<value-of>row["resource_id"]</value-of>');"></body>
</pre>
Thanks for your help.<br />
<br />
Chris<br />
<br />
Perhaps I need to tell you that I'm using BIRT v2.2.1