Hi all,
I wish to display images on my report. These are stored in SQL server as varbinary fields. Can anyone here please tell me the procedure of how to display images (in byte[]).
I did exactly what is mentioned in
http://rgauss.com/category/interface/---getting no such method exception...
and http://vmustafayev4en.blogspot.com/2011/08/read-alfresco-node-to-byte-array-in.html-- here I am getting java.lang.ArrayIndexOutOfBoundsException: -77.
Thanks,
Vivekanand Alampally.
2 Answers:
Hi Vivekanand,
I haven't used SQL server only MySQL but I assume the image is converted to the same java Object.
logo is the SQL field. i.e select logo from company;
Hope it helps.
Munga
Code: |
<imageExpression class="java.io.InputStream"><![CDATA[((java.sql.Blob)$F{logo}).getBinaryStream()]]></imageExpression></td></tr></tbody></table> |
Thanks Munga for your solution..
I tried http://www.kavecan.com/index.php?id=82 and it worked...
Thank you,
Vivek..
does this mean you want to convert byte array to image, here is tutorial and codes: http://www.rasteredge.com/how-to/csharp-imaging/covert-image-to-byte/