jasper reports - How JasperReports display CLOB field with HTML tags -
i want show value in detail band. line oracle db data type clob , value contain html tag
i error message:
error filling print... error evaluating expression : source text : $f{discharge_text}.getsubstring( 1l, ( new long( $f{discharge_text}.length() ) ).intvalue()) net.sf.jasperreports.engine.fill.jrexpressionevalexception: error evaluating expression : source text : $f{discharge_text}.getsubstring( 1l, ( new long( $f{discharge_text}.length() ) ).intvalue()) at net.sf.jasperreports.engine.fill.jrevaluator.evaluate(jrevaluator.java:195) at net.sf.jasperreports.engine.fill.jrcalculator.evaluate(jrcalculator.java:589) at net.sf.jasperreports.engine.fill.jrcalculator.evaluate(jrcalculator.java:557) at net.sf.jasperreports.engine.fill.jrfillelement.evaluateexpression(jrfillelement.java:929) at net.sf.jasperreports.engine.fill.jrfilltextfield.evaluatetext(jrfilltextfield.java:383) at net.sf.jasperreports.engine.fill.jrfilltextfield.evaluate(jrfilltextfield.java:368) at net.sf.jasperreports.engine.fill.jrfillelementcontainer.evaluate(jrfillelementcontainer.java:258) at net.sf.jasperreports.engine.fill.jrfillband.evaluate(jrfillband.java:499) at net.sf.jasperreports.engine.fill.jrverticalfiller.fillcolumnband(jrverticalfiller.java:2033) at net.sf.jasperreports.engine.fill.jrverticalfiller.filldetail(jrverticalfiller.java:760) at net.sf.jasperreports.engine.fill.jrverticalfiller.fillreportstart(jrverticalfiller.java:270) at net.sf.jasperreports.engine.fill.jrverticalfiller.fillreport(jrverticalfiller.java:128) at net.sf.jasperreports.engine.fill.jrbasefiller.fill(jrbasefiller.java:946) at net.sf.jasperreports.engine.fill.jrbasefiller.fill(jrbasefiller.java:845) at net.sf.jasperreports.engine.fill.jrfiller.fillreport(jrfiller.java:58) at net.sf.jasperreports.engine.jasperfillmanager.fillreport(jasperfillmanager.java:417) at net.sf.jasperreports.engine.jasperfillmanager.fillreport(jasperfillmanager.java:247) at com.jaspersoft.ireport.designer.compiler.ireportcompiler.run(ireportcompiler.java:877) at org.openide.util.requestprocessor$task.run(requestprocessor.java:572) at org.openide.util.requestprocessor$processor.run(requestprocessor.java:997) caused by: java.lang.classcastexception: oracle.sql.clob cannot be cast to oracle.sql.clob at testreport_1377507739843_118503.evaluate(testreport_1377507739843_118503:199) at net.sf.jasperreports.engine.fill.jrevaluator.evaluate(jrevaluator.java:182) ... 19 more print not filled. try use emptydatasource...
i applied failed run report
$f{discharge_text}.getsubstring( 1l, ( new long( $f{discharge_text}.length() ) ).intvalue())
jrxml is
<?xml version="1.0" encoding="utf-8"?> <jasperreport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="report1" language="groovy" pagewidth="595" pageheight="842" columnwidth="555" leftmargin="20" rightmargin="20" topmargin="20" bottommargin="20" uuid="c9787a67-b067-4421-a7b5-e13d0e6785d8"> <property name="ireport.zoom" value="1.0"/> <property name="ireport.x" value="0"/> <property name="ireport.y" value="0"/> <querystring language="sql"> <![cdata[select discharge_text ip_discharge admission_no='a011303011860']]> </querystring> <field name="discharge_text" class="oracle.sql.clob"/> <background> <band splittype="stretch"/> </background> <title> <band height="79" splittype="stretch"/> </title> <pageheader> <band height="35" splittype="stretch"/> </pageheader> <columnheader> <band height="61" splittype="stretch"> <statictext> <reportelement uuid="ac99f9c5-28bf-410d-aee2-8ad5bdb95708" x="293" y="2" width="100" height="20"/> <textelement/> <text><![cdata[discharge_text]]></text> </statictext> </band> </columnheader> <detail> <band height="125" splittype="stretch"> <textfield> <reportelement uuid="9d6fdb47-3f70-4620-9cf8-17fcc2be4da8" x="293" y="55" width="100" height="20"/> <textelement/> <textfieldexpression><![cdata[$f{discharge_text}.getsubstring( 1l, ( new long( $f{discharge_text}.length() ) ).intvalue())]]></textfieldexpression> </textfield> </band> </detail> <columnfooter> <band height="45" splittype="stretch"/> </columnfooter> <pagefooter> <band height="54" splittype="stretch"/> </pagefooter> <summary> <band height="42" splittype="stretch"/> </summary> </jasperreport>
Comments
Post a Comment