title: How to display CLOB (or BLOB) String in iReport?
body: <p>I need to display a CLOB field with longer than 4000 characters in a text field using in iReport. I am using iReport version 5.5.0, I tried converting the CLOB to InputStream but it did not work, all I get is:</p>
  
  <pre><code>java.io.ByteArrayInputStream@43842a66
  </code></pre>
  
  <p>I tried getSubString(long,int) but it only works for strings smaller than 4000 chars. stringValue() and toString() also did not work.</p>
  
  <p>Thanks for any help.</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Clob.getSubString(long,int) method worked fine in my latter tests, I don't know why it didn't work before. So I used:</p>
  
  <pre><code>$F{FIELD}.getSubString( (long)1, (int)$F{FIELD}.length() )
  </code></pre>
  
  <p>eventually. It may not be the best option, but I figured max length of a String (2147483647) is more than enough for the field.</p>