Home
Analytics
Conditionally displaying a BLOB image
mminella
I'm currently working on a PDF report that displays images received from a scripted datasource (The java code returns them as SerialBlob's). That part works great. The issue I'm having is that not all of the rows will have an image. In that case, I don't want to display anything. Right now, when the report comes across a row without an image, it displays "Current report item is not supported in this report format". So my question is how can I conditionally display an image from a scripted datasource in a PDF report?
Find more posts tagged with
Comments
KavithaD
Hi mminella,
For a image in property editor you have property like visibility check the hide element and in Fx you can add your validation like params["image"] == null.That will hide the image component if image is null.
Thank you,
Kavitha
Jordan Ben
<p>Hi
I have postgresql database containing images in a column[photo]. I used byte type to store images.when i create a Dataset by default the column type is blob. I tried dynamic image insert to displaying images,stored in the column. Images are displaying when i run the report using eclipse juno. But when I run the report in my browser (I use birt runtime deployed in tomcat), images are not displaying.
There are some error messages like this :</p><pre class="_prettyXprint _lang-nocode"> - There is no report design object available.org.eclipse.birt.report.exception.ViewerException: There is no report design object available. at org.eclipse.birt.report.context.ViewerAttributeBean.__init(ViewerAttributeBean.java:230) at org.eclipse.birt.report.context.BaseAttributeBean.init(BaseAttributeBean.java:233) at org.eclipse.birt.report.context.ViewerAttributeBean.(ViewerAttributeBean.java:113) at org.eclipse.birt.report.context.BirtContext.__init(BirtContext.java:44) at org.eclipse.birt.report.context.BaseContext.(BaseContext.java:69) at org.eclipse.birt.report.context.BirtContext.(BirtContext.java:30) at org.eclipse.birt.report.servlet.ViewerServlet.__getContext(ViewerServlet.java:150) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:621) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327) at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:112) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)⃕⃕</pre><p>Could you help me please ??
</p>
kclark
<p>Are you viewing the report with the viewer via the URL or are you embedding the viewer with the JSP tag library? Can you post your rptdesign?</p>
Jordan Ben
<blockquote class="ipsBlockquote" data-author="kclark" data-cid="118205" data-time="1373039304"><div><p>Are you viewing the report with the viewer via the URL or are you embedding the viewer with the JSP tag library? Can you post your rptdesign?</p></div></blockquote><p>
I'm viewing the report with the viewer via the URL and it works for other reports. But, when I try to view a report which is containing an image element on the report it's fail.
Could help me again please ?
This is my report.
<a data-ipb='nomediaparse' href='
http://www.filesnack.com/files/cdk5299t'>http://www.filesnack.com/files/cdk5299t</a>
;
Thank you..
</p>