Solved

jasper report java.sql.date mysql problem

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
array6 challenfge 6 65
parentbit challenge 3 52
Java and GPO 11 47
Java / Linux and Regular Expressions 11 48
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now