cancel
Showing results for 
Search instead for 
Did you mean: 

Images in JRC

Former Member
0 Kudos

<p>I am trying to provide an integrated Crystal Viewer in a Java desktop application, and cannot get images to display in the ReportViewerBean.</p><p> My report&#39;s data source is a TTX Field Definition file, because we are not guaranteed to have server access when running reports. As an extremely simple case, I&#39;ve designed a report with two fields: ID and Drawing. The ID field is self-explanatory. The drawing field is the problem.</p><p> So far, I&#39;ve tried using the "dynamic image" feature new to CR 11.5, storing the image in the database and passing it in as a field in the result set, and attempting to pass it in as a byte array member of a POJO. None of these work. Both the POJO and java.sql.resultset attempts threw an exception from within the ReportViewerBean "Couldn&#39;t read stream" which hung the application.</p><p> Is anyone successfully displaying images in the Java Reporting Component&#39;s ReportViewerBean object? If so, how are you supplying the data? Does the image have to be of a specific type? If so, what type of image does it have to be?</p><p>If anyone can offer some advice or suggestions, I would really appreciate it. If I can&#39;t get this figured out, we&#39;re going to have to find a different product for reporting and my boss won&#39;t be happy about that.</p><p>Thank you, Erika</p>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

<p>&nbsp;</p><p>I&#39;ve displayed images retrieved from a database via the ReportViewerBean, so I don&#39;t think it&#39;s a limitation intrinsic to that class.</p><p>I retrieve the database field as a BLOB object, and the JRC reads in the content via the BLOB input stream. </p><p>I&#39;m wondering if the connection is being closed, or the object is not being returned.</p><p>One quick check would be to try accessing the image outside of the JRC directly from your Java code, to ensure that the BLOB stream is indeed accessible.</p><p>TUeda </p>