You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I am using tJasperoutput component in Talend Integration Suit 5.0 to generate report. If all the filelds of the Report are of string type, then I am getting perfect output but if the jrxml has an integer or float values then the tJasperoutput step throws error. The schema of input component and tJasperoutput component is same.
The following is the error msg I am getting:-
Starting job Report3 at 16:58 30/07/2012.
[statistics] connecting to socket on port 3724
[statistics] connected
Exception in component tJasperOutput_1
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_emp_id.getValue())); //$JR_EXPR_ID=11$
<-------------------------------------------------------------->
2. Cannot cast from Float to String
value = (java.lang.String)(((java.lang.Float)field_sales.getValue())); //$JR_EXPR_ID=14$
<----------------------------------------------------------->
3. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_emp_id.getOldValue())); //$JR_EXPR_ID=11$
<----------------------------------------------------------------->
4. Cannot cast from Float to String
value = (java.lang.String)(((java.lang.Float)field_sales.getOldValue())); //$JR_EXPR_ID=14$
<-------------------------------------------------------------->
5. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_emp_id.getValue())); //$JR_EXPR_ID=11$
<-------------------------------------------------------------->
6. Cannot cast from Float to String
value = (java.lang.String)(((java.lang.Float)field_sales.getValue())); //$JR_EXPR_ID=14$
<----------------------------------------------------------->
6 errors
at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:191)
at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:215)
at net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:131)
at client.report3_0_1.Report3.tFileInputDelimited_1Process(Report3.java:747)
at client.report3_0_1.Report3.runJobInTOS(Report3.java:973)
at client.report3_0_1.Report3.main(Report3.java:841)
[statistics] disconnected
Job Report3 ended at 16:58 30/07/2012. [exit code=1]
Thanks
Offline

Hi All
This issue is related to the topic [Forum, topic 25305] tJasperoutput.
Regards,
Pedro
Offline
Pages: 1