Solved

jasper report java.sql.date mysql problem

Posted on 2011-02-15
5
2,210 Views
Last Modified: 2012-05-11
I try to design a report on a mysql database with jaspersoft ireport designer. I have a problem with date typed fields : "unable to get value for field x for class java.sql.date". I have tried to convert the field with the date function in the query but this doesn't help. Thanks by advance for your help.
0
Comment
Question by:proximal
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 14

Accepted Solution

by:
Kalpan earned 250 total points
ID: 34894819
please check the mysql query are you using for the date fields....please past the query if possible ...

refer the following

http://stackoverflow.com/questions/3615237/jasperreport-field-date
0
 
LVL 92

Assisted Solution

by:objects
objects earned 250 total points
ID: 34894839
check your not mixing java.sql.Date with java.util.Date
0
 

Author Comment

by:proximal
ID: 34895530
My field "date_closed" is of the type date in the mysql structure.

This is a very simple query to test the problem :

SELECT
     `opportunities`.`name` AS opportunity_name,
     `opportunities`.`date_closed` AS opportunity_date_closed
FROM
     `opportunities`
ORDER BY opportunity_date_closed

No problem without the ORDER BY clause.
0
 

Author Comment

by:proximal
ID: 34895979
I reply to myself : there were records with date = null in my table. Everything fine when I solved this problem.

Thanks for your help.
0
 

Author Closing Comment

by:proximal
ID: 34898756
Solved.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question