Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

I am facing problem when exporting report using iReport 3.5.0

  Asked By: Jamal    Date: Oct 10    Category: Java    Views: 1152
  

Kindly help me.

I am using jasper iReport 3.5.0 tool to generate report. When i compile the report its gives error

ERROR LOG

net.sf.jasperreports.engine.JRException: Error executing SQL statement for : client_log_enquiry      at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:141)      at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:676)      at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:596)      at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1223)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:853)      at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)      at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:421)      at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:251)      at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:896)      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)  Caused by: java.sql.SQLException: ORA-00936: missing expression       at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111)      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:330)      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:287)      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:744)      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:218)      at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:812)      at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1048)      at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:853)      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1153)      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3369)      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3414)      at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:135)      ... 11 more 
Print not filled. Try to use an EmptyDataSource...




I am also uploading jasper report contents so that you may have better understanding... Please help me out and tell me where i am doing mistake



I AM UPLOADING (Parameters,QUERY PART,Field Names) OF REPORT AND I THINK SO MISTAKE IN QUERY PART SO PLEASE CHECK



<parameter name="startValue" class="java.lang.Integer">
<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
</parameter>
<parameter name="endValue" class="java.lang.Integer">
<defaultValueExpression><![CDATA[25]]></defaultValueExpression>
</parameter>
<parameter name="noOfPages" class="java.lang.Integer">
<defaultValueExpression><![CDATA[1]]></defaultValueExpression>
</parameter>
<parameter name="pageIndex" class="java.lang.Integer">
<defaultValueExpression><![CDATA[0]]></defaultValueExpression>
</parameter>
<parameter name="countRow" class="java.lang.Integer">
<defaultValueExpression><![CDATA[-1]]></defaultValueExpression>
</parameter>
<parameter name="storetype" class="java.lang.String">
<defaultValueExpression><![CDATA["ALL STORE"]]></defaultValueExpression>
</parameter>
<parameter name="REPORT_PERIOD" class="java.lang.String"/>
<parameter name="REPORT_TYPE" class="java.lang.String"/>
<parameter name="DATE_TO" class="java.lang.String"/>
<parameter name="DATE_FROM" class="java.lang.String"/>
<parameter name="queryCommon" class="java.lang.String"/>
<parameter name="sql" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["select * from(select rownum as pk,M.* from(select NVL(TO_CHAR(c.created_date),'n/a') as CREATED_DATE,NVL(TO_CHAR(c.updated_date),'n/a') as UPDATED_DATE, "
+ " NVL(TO_CHAR((select cs.name_en from card_status cs where c.status=cs.id)),'n/a') as STATUS, "
+ " NVL(TO_CHAR((select s.name from site s where s.id=c.site_id)),'n/a') as ENROLLMENT_CENTER,NVL(TO_CHAR(c.replace_by),'n/a') as OPERATOR_NAME, "
+ " NVL(TO_CHAR(c.account_no),'n/a') as OPERATOR_NO "
+ " from Card c where "
+ $P{queryCommon}+")m where rownum <= '"
+$P{endValue}+"' ) m where pk >='"
+ $P{startValue}+"'"]]></defaultValueExpression>
</parameter>
<queryString>
<![CDATA[$P!{sql}]]>
</queryString>
<field name="UPDATED_DATE" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="CREATED_DATE" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="STATUS" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="ENROLLMENT_CENTER" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="OPERATOR_NAME" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<field name="OPERATOR_NO" class="java.lang.String">
<fieldDescription><![CDATA[]]></fieldDescription>
</field>
<variable name="rowCount" class="java.lang.Integer" resetType="Page" calculation="Sum">
<variableExpression><![CDATA[new Integer(1)]]></variableExpression>
</variable>
<variable name="finalCountValue" class="java.lang.Integer">
<variableExpression><![CDATA[$V{rowCount} +$P{countRow}]]></variableExpression>
<initialValueExpression><![CDATA[$V{rowCount} +$P{countRow}]]></initialValueExpression>
</variable>


When i compile its gives error...??????????

Share: 

 

No Answers Found. Be the First, To Post Answer.

 




Tagged: