Hallo,
I have a problem that I can't set a Blob-Field in Java-Source-Code.
The program have the following logic.
- There is an JavaBean, that will return a ResultSet with the data.
This resultset is set as DataSource on the ReportDocument. - The ResultSet is created by MockRunner in Code.
- In the ResultSet there is a column which have the type java.sql.Types.BLOB.
- In the Blob-Column are Bitmaps serialized as Byte-Array
rs.addColumn("blobbmp", new Blob[]{new SerialBlob(loadImage("bmp"))});
If I use the JavaBean as DataSource in the Crystal Reports Designer, there are no problems. The designer shows me all data and images in the preview window.
But if I set the ResultSet as DataSource in JavaCode, I can't see any data in the generated report.
I have set the data in code like this:
document.getDatabaseController().setDataSource(bean.TypenTest(), "TypenTest", "TypenTest");
Then I have exported the report as PDF-File
In the generated pdf-document I can't see any data from the JavaBean.
But if I remove the Blob-Column from the ResultSet, then I can the the other data.
Has anyone a tipp what I can do?
Maybe Blob-Columns are not supported by JavaBean. But I can't find a corresponding hint in documentation.
Thanks for your help.