Jump to content
JasperReports Library 7.0 is now available ×

Jasper and time fields


Recommended Posts

By: Don - nigdon

Jasper and time fields

2006-01-19 20:54

I keep a few time fields in a PostgreSQL database, stored in the hh:mm:ss format.

 

When the user wants to construct a report, they use my ReportBuilder interface. A JasperDesign object is created and filled by the ReportBuilder interpreter, compiled on-the-fly, and the report is displayed using JRViewer.

 

For any fields representing a time, I initially chose to specify the value-class for the expression of the hosting textfield in the report to be java.util.Date.

 

However, the value shown is always 00:00 (in my preferred display format).

 

Would someone, please, tell me why that is?

 

I've since changed the value-class to java.sql.Time, and the output is as I expect (eg. 14:57), albeit that it seems to take a noticeably longer time to display.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...