Solved

jasper report java.sql.date mysql problem

Posted on 2011-02-15
5
2,181 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

730 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