I'm trying to wrap my text around an Image.
The structure I need to create is as in the picture bellow:
This is what I have tried
I have tried using table which did not succeed. I tough of using text field as html and passing image to it and set the alignment to left, but I found out that it is not possible to pass the image in text field. I started to solve the problem using jaspersoft Studio pro and with its html element. However I could not figure out how to pass the image field from data base as the html source. The expression in the html element is:
"<img src= '$F{Image}' align='left'/> <p>"+$F{KN_Zusatzinfo_DV_Einleitungstext} +"</p>"
This code does not show the image, but a box instead of the image. And the text which is printed is not stretched. The page style which I use is two column. The HTML out put is as in the picture
Using a static path like one bellow to an image works, but it is not an option for me since I need to read the Image from data base:
"<style>.left { float: left; margin-left: 1em; width :40%;}</style><p><img class = left src= C:/Users/iman/JaspersoftWorkspace/Qreport/sample1.png />
If I just use an Image Element with a text box under that the out put and design view are as these pictures:
The HTML source of the html approach is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
a {
text-decoration: none
}
</style>
</head>
<body text="#000000" link="#000000" alink="#000000" vlink="#000000">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%"> </td>
<td align="center">
<a name="JR_PAGE_ANCHOR_0_1"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
<td style="width:20px"></td>
<td style="width:40px"></td>
<td style="width:210px"></td>
<td style="width:32px"></td>
<td style="width:58px"></td>
<td style="width:10px"></td>
<td style="width:182px"></td>
<td style="width:9px"></td>
<td style="width:24px"></td>
</tr>
<tr valign="top" style="height:25px">
<td colspan="10">
</td>
</tr>
<tr valign="top" style="height:5px">
<td colspan="6">
</td>
<td colspan="3" rowspan="2" style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert (Konventionell chirurgisch)</span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td colspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="3">
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:20px">
<td colspan="7">
</td>
<td colspan="2" style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;">Dr XYZ</span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:88px">
<td colspan="10">
</td>
</tr>
<tr valign="top" style="height:74px">
<td colspan="5">
</td>
<td colspan="3" rowspan="2">
<div style='width:250px;height:90px;background-color: #FFFFFF; overflow:hidden;'>
<img src='((java.awt.Image)field_Image.getValue())' align='left' />
<p>Bei der Aortenklappe handelt es sich um das „Ventil“ zwischen der linken HerzkeAortenklappenchirurgie, isoliert - konventionell - Aortenklappenchirurgie, isoliert - kathetergestützt Die Qualitätsindikatoren der k........
appenchirauch die Indikationsstellung betrachtet. Sofern nicht anders angegeben, ist die Beschreibung der Qualitätsindikatoren eine Fortschreibung der QIDB 2014 des AQUA-Institutes.</p>
</div>
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:16px">
<td colspan="2">
</td>
<td colspan="2" rowspan="2">
<div style='width:250px;height:90px;background-color: #FFFFFF; overflow:hidden;'>
<img src='((java.awt.Image)field_Image.getValue())' align='left' />
<p>Bei der Aortenklappe handelt es sich um das „Ventil“ zwischen der linken Herzkammer und der Hauptschlagader (Aorta). Schließt die Klappe nicht mehr dicht, spriitätsindikatoren der konventionellen Aortenklappenchirurgie fokussieren schwere Komplikationen und Sterblichkeit.
Bei der kathetergestützten Aortenklappenchirurgie wird darüber hinaus auch die Indikationsstellung betrachtet. Sofern nicht anders angegeben, ist die Beschreibung der Qualitätsindikatoren eine Fortschreibung der QIDB 2014 des AQUA-Institutes.</p>
</div>
</td>
<td>
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:74px">
<td colspan="2">
</td>
<td colspan="6">
</td>
</tr>
<tr valign="top" style="height:520px">
<td colspan="10">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_2"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
...
<td style="width:24px"></td>
</tr>
<tr valign="top" style="height:27px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td colspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="4">
</td>
</tr>
<tr valign="top" style="height:7px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:21px">
<td colspan="5">
</td>
<td style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert </span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:125px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:90px">
<td colspan="2">
</td>
<td colspan="2">
<div style='width:250px;height:90px;background-color: #FFFFFF; overflow:hidden;'>
<img src='((java.awt.Image)field_Image.getValue())' align='left' />
<p>....deleted some text because it exceeded the limit..</p>
</div>
</td>
<td colspan="3">
</td>
</tr>
<tr valign="top" style="height:552px">
<td colspan="7">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_3"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:595px"></td>
</tr>
<tr valign="top" style="height:842px">
<td>
</td>
</tr>
</table>
<![if IE]>
<script>
var links = document.querySelectorAll('link.jrWebFont');
setTimeout(function() {
if (links) {
for (var i = 0; i < links.length; i++) {
links.item(i).href = links.item(i).href;
}
}
}, 0);
</script>
<![endif]>
</td>
<td width="50%"> </td>
</tr>
</table>
</body>
</html>
And the HTML source of the Image element plus text field is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<style type="text/css">
a {
text-decoration: none
}
</style>
</head>
<body text="#000000" link="#000000" alink="#000000" vlink="#000000">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="50%"> </td>
<td align="center">
<a name="JR_PAGE_ANCHOR_0_1"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
<td style="width:60px"></td>
<td style="width:232px"></td>
<td style="width:33px"></td>
<td style="width:35px"></td>
<td style="width:10px"></td>
<td style="width:5px"></td>
<td style="width:186px"></td>
<td style="width:1px"></td>
<td style="width:23px"></td>
</tr>
<tr valign="top" style="height:25px">
<td colspan="10">
</td>
</tr>
<tr valign="top" style="height:5px">
<td colspan="5">
</td>
<td colspan="3" rowspan="2" style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert (Konventionell chirurgisch)</span>
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="3">
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:20px">
<td colspan="6">
</td>
<td colspan="2" style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;">Dr XYZ</span>
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:94px">
<td colspan="10">
</td>
</tr>
<tr valign="top" style="height:50px">
<td colspan="4">
</td>
<td colspan="3">
<img src="report7921484792758494686.html_files/img_0_0_3" style="width: 50px" alt="" />
</td>
<td colspan="3">
</td>
</tr>
<tr valign="top" style="height:24px">
<td colspan="10">
</td>
</tr>
<tr valign="top" style="height:477px">
<td colspan="3">
</td>
<td colspan="6" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;">Bei der Aortenklappe handelt es sinken Herzkammer und der Hauptschlagader (Aorta). Einsatz einer künstlichen Herzklappe behandelt.<br/><br/>Bei beiden kathetergestützten Methoden wird über ein spezielles Ballonkathetersystem zunächst der Bereich der </span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:127px">
<td colspan="10">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_2"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
...
<td style="width:24px"></td>
</tr>
<tr valign="top" style="height:27px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td colspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="4">
</td>
</tr>
<tr valign="top" style="height:7px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:21px">
<td colspan="5">
</td>
<td style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert </span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:139px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:264px">
<td colspan="2">
</td>
<td colspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;">alten, verengten Aortenklappe erweitert. - des AQUA-Institutes.</span>
</td>
<td colspan="3">
</td>
</tr>
<tr valign="top" style="height:364px">
<td colspan="7">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_3"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
<td style="width:10px"></td>
...
<td style="width:1px"></td>
<td style="width:23px"></td>
</tr>
<tr valign="top" style="height:27px">
<td colspan="11">
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td colspan="3" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:7px">
<td colspan="11">
</td>
</tr>
<tr valign="top" style="height:21px">
<td colspan="8">
</td>
<td style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert </span>
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:65px">
<td colspan="11">
</td>
</tr>
<tr valign="top" style="height:66px">
<td colspan="7">
</td>
<td colspan="3" rowspan="4" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;"><br/>Bei beiden kathetergestützten Me die Indikationsstellung betrachtet.<br/><br/>Sofern nicht anders angegeben, ist die Beschreibung der Qualitätsindikatoren eine Fortschreibung der QIDB 2014 des AQUA-Institutes.</span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:50px">
<td colspan="3">
</td>
<td colspan="2">
<img src="report7921484792758494686.html_files/img_0_2_2" style="width: 50px" alt="" />
</td>
<td colspan="2">
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:24px">
<td colspan="7">
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:161px">
<td colspan="2">
</td>
<td colspan="4" rowspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;">Bei der Aortenklapprzspitze über einen 3 bis 5 cm langen Hautschnitt im Rippenbereich (linker Brustkorb, im 4. oder 5. Rippenzwischenraum) freigelegt. <br/>- Beim endovaskulären Aortenklappenersatz ist lediglich ein gezielter Einstich (Punktion), zumeist in die Leistenarterie, notwendig. <br/></span>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:279px">
<td colspan="2">
</td>
<td colspan="5">
</td>
</tr>
<tr valign="top" style="height:122px">
<td colspan="11">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_4"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
<td style="width:60px"></td>
...
<td style="width:1px"></td>
<td style="width:23px"></td>
</tr>
<tr valign="top" style="height:27px">
<td colspan="9">
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:7px">
<td colspan="9">
</td>
</tr>
<tr valign="top" style="height:21px">
<td colspan="5">
</td>
<td colspan="2" style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert </span>
</td>
<td colspan="2">
</td>
</tr>
<tr valign="top" style="height:91px">
<td colspan="9">
</td>
</tr>
<tr valign="top" style="height:50px">
<td colspan="4">
</td>
<td colspan="2">
<img src="report7921484792758494686.html_files/img_0_3_2" style="width: 50px" alt="" />
</td>
<td colspan="3">
</td>
</tr>
<tr valign="top" style="height:24px">
<td colspan="9">
</td>
</tr>
<tr valign="top" style="height:477px">
<td colspan="3">
</td>
<td colspan="5" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif;r Brustkorb, im 4. oder 5. Rippenzwischenraum) freigelegt. <br/>- Beim endovaskulären Aortenklappenersatz ist lediglich ein gezielter Einstich (Punktion), zumeist in die Leistenarterie, notwendig. <br/><br/>Bei beiden kathetergestützten Methoden wird über ein spezielles Ballonkathetersystem zunächst der Bereich der </span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:125px">
<td colspan="9">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_5"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:10px"></td>
<td style="width:10px"></td>
<td style="width:50px"></td>
<td style="width:220px"></td>
<td style="width:80px"></td>
<td style="width:201px"></td>
<td style="width:24px"></td>
</tr>
<tr valign="top" style="height:27px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:20px">
<td>
</td>
<td colspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #BABABA; font-size: 10px; line-height: 1.2578125;">Ergebnisse</span>
</td>
<td colspan="4">
</td>
</tr>
<tr valign="top" style="height:7px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:21px">
<td colspan="5">
</td>
<td style="text-indent: 0px; text-align: right;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #6B66FA; font-size: 10px; line-height: 1.2578125;">HCH-A - Aortenklappenchirurgie, isoliert </span>
</td>
<td>
</td>
</tr>
<tr valign="top" style="height:139px">
<td colspan="7">
</td>
</tr>
<tr valign="top" style="height:264px">
<td colspan="2">
</td>
<td colspan="2" style="text-indent: 0px; text-align: left;">
<span style="font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; color: #000000; font-size: 10px; line-height: 1.2578125;">alten, verengten Aortenklappe erweitert. Anschließend wird eine zusammengefaltete Herzklappenchirurgie fokussieren schwere Komplikationen und Sterblichkeit. Bei der kathetergestützten Aortenklappenchirurgie wird darüber hinaus auch die Indikationsstellung betrachtet.<br/><br/>Sofern nicht anders angegeben, ist die Beschreibung der Qualitätsindikatoren des AQUA-Institutes.</span>
</td>
<td colspan="3">
</td>
</tr>
<tr valign="top" style="height:364px">
<td colspan="7">
</td>
</tr>
</table>
<br/>
<br/>
<a name="JR_PAGE_ANCHOR_0_6"></a>
<table class="jrPage" cellpadding="0" cellspacing="0" border="0" style="empty-cells: show; width: 595px; border-collapse: collapse; background-color: white;">
<tr valign="top" style="height:0">
<td style="width:595px"></td>
</tr>
<tr valign="top" style="height:842px">
<td>
</td>
</tr>
</table>
<![if IE]>
<script>
var links = document.querySelectorAll('link.jrWebFont');
setTimeout(function() {
if (links) {
for (var i = 0; i < links.length; i++) {
links.item(i).href = links.item(i).href;
}
}
}, 0);
</script>
<![endif]>
</td>
<td width="50%"> </td>
</tr>
</table>
</body>
</html>
How can I achieve this structure?
This reads the image and put it at the right place. But as I said I need to read it from data base.
– Iman Jul 07 '16 at 10:38