error executing sql statement for null

0

Help! I always have this erro message whenever i want to view my report ftom java gui "net.sf.jasperreports.engine.jrexception error executing sql statement for null". I can preview the report without any problem, just whenever i try to click a button form the java gui, the same error message always pop up. Is there any problem with my SQL? Where is the null? I'm really frustrated because of this.

SELECT
     brgkeluar_kmf.`tanggal` AS brgkeluar_kmf_tanggal,
     brgkeluar_kmf.`kode` AS brgkeluar_kmf_kode,
     brgkeluar_kmf.`nama` AS brgkeluar_kmf_nama,
     brgkeluar_kmf.`satuan` AS brgkeluar_kmf_satuan,
     brgkeluar_kmf.`kategori` AS brgkeluar_kmf_kategori,
     brgkeluar_kmf.`departemen` AS brgkeluar_kmf_departemen,
     brgkeluar_kmf.`blok` AS brgkeluar_kmf_blok,
     brgkeluar_kmf.`estate` AS brgkeluar_kmf_estate,
     brgkeluar_kmf.`jumlah` AS brgkeluar_kmf_jumlah,
     brgkeluar_kmf.`harga` AS brgkeluar_kmf_harga
FROM
     `brgkeluar_kmf` brgkeluar_kmf
WHERE tanggal BETWEEN $P{nomorAwal} AND $P{nomorAkhir}
shirophedra's picture
Joined: Jun 24 2020 - 11:26pm
Last seen: 3 months 3 weeks ago

3 Answers:

0

This stackoverflow answer says the issue is with the different datatype between the parameter and the database:

https://stackoverflow.com/questions/14950970/jasper-reports-error-execut...

jgust's picture
267
Joined: Jun 10 2010 - 6:39am
Last seen: 19 hours 41 min ago
0

I set the datatype to varchar and the parameter is text. I think they should have the same datatype. And the error is the same. net.sf.jasperreports.engine.jrexception error executing sql statement for null. I dont know what is the null mean here.

Attachments: 
AttachmentSize
Image icon report_problem.png43.97 KB
shirophedra's picture
Joined: Jun 24 2020 - 11:26pm
Last seen: 3 months 3 weeks ago
0

The only other thing that looks odd to me is the accented quote characters around each field.

jgust's picture
267
Joined: Jun 10 2010 - 6:39am
Last seen: 19 hours 41 min ago
Feedback
randomness