alexa-tracking

Main Content

1024
1024
KASKUS
51
244
https://www.kaskus.co.id/thread/52f4feab59cb17ce2b8b47f3/askjava-jasperreports
[ASK]Java JasperReports
permisi agan", ane newbie di java programming, ane mau tanya tentang jasperreport, ane dapet error kaya begini,

Quote:

net.sf.jasperreports.engine.component.ComponentsEnvironment findComponentBundles
WARNING: Found two components for namespace http://jasperreports.sourceforge.net...rts/components
net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. Cannot cast from Date to String
value = (java.lang.String)(((java.sql.Date)field_belitunai_tanggalTunai.getValue())); //$JR_EXPR_ID=11$
<-------------------------------------------------------------------------->
2. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_belitunai_bayar.getValue())); //$JR_EXPR_ID=12$
<----------------------------------------------------------------------->
3. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_motor_harga.getValue())); //$JR_EXPR_ID=17$
<------------------------------------------------------------------->
4. Cannot cast from Date to String
value = (java.lang.String)(((java.sql.Date)field_belitunai_tanggalTunai.getOldValue())); //$JR_EXPR_ID=11$
<----------------------------------------------------------------------------->
5. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_belitunai_bayar.getOldValue())); //$JR_EXPR_ID=12$
<-------------------------------------------------------------------------->
6. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_motor_harga.getOldValue())); //$JR_EXPR_ID=17$
<---------------------------------------------------------------------->
7. Cannot cast from Date to String
value = (java.lang.String)(((java.sql.Date)field_belitunai_tanggalTunai.getValue())); //$JR_EXPR_ID=11$
<-------------------------------------------------------------------------->
8. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_belitunai_bayar.getValue())); //$JR_EXPR_ID=12$
<----------------------------------------------------------------------->
9. Cannot cast from Integer to String
value = (java.lang.String)(((java.lang.Integer)field_motor_harga.getValue())); //$JR_EXPR_ID=17$
<------------------------------------------------------------------->
9 errors

BUILD SUCCESSFUL (total time: 31 seconds)



mohon bantuannya ya para mastah emoticon-Malu
Quote:Original Posted By addimasyqy
permisi agan", ane newbie di java programming, ane mau tanya tentang jasperreport, ane dapet error kaya begini,



mohon bantuannya ya para mastah emoticon-Malu


seinget ane kalo ga salah jasper itu format kolom2nya harus sesuai sama hasil keluarnnya gan

itu bisa jadi pas di kolom displaynya agan berupa string tapi data yang ditampilin berupa integer

ane juga agak lupa sih emoticon-Malu (S)
tapi usahain sama gan

solved

Quote:Original Posted By Mastela


seinget ane kalo ga salah jasper itu format kolom2nya harus sesuai sama hasil keluarnnya gan

itu bisa jadi pas di kolom displaynya agan berupa string tapi data yang ditampilin berupa integer

ane juga agak lupa sih emoticon-Malu (S)
tapi usahain sama gan


Alhamdulillah, bisa gan emoticon-Malu
expression class nya ane tambahin .toString () ,
terimakasih gan atas petunjuknya emoticon-2 Jempol
×