Jump to content
We've recently updated our Privacy Statement, available here ×

Date/Time Datetime Date Time Parameter


hgfree

Recommended Posts

Hello,

Using iReport 3.0.0  Running the report locally, not through Jasper Plugin. 
A datetime parameter has been set up (java.sql.Timestamp) and set to Use as a Prompt.  The prompt appears OK.  However, the sections for the time entry do not appear to work correctly.  There are three sections for time input, which appear to be hours, minutes, and seconds.  In the attached screenshot I entered 22:50:30 but the report output shows 22:30:00.  The hour is OK, but the minute portion does not appear and the seconds appear where the minutes should appear in the report output.  Any ideas on how to correct?

Thank You,

Chris

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Another related note of interest:
Using this basic query -
select
field_id,
to_char(sysdate, 'dd-mon-yyyy hh24:mi:ss') as sysdate2,
sysdate
from source.table
where field_id = 123456

I configure the sysdate field to display HH.mm.ss to see if it matches the to_char HH.mm.ss.

This yields two different results depending if I run it locally through iReport or run it on JasperServer.  The datasource connection is configured the same in both cases.
The local result will display the correct time for our time zone (Eastern Time - USA) for both report fields sysdate2 and sysdate.
The iReport JS Plugin result will display the correct time for sysdate2, but the sysdate field displays GMT.
Also, the JS Plugin will not render in pdf, had to utilize the Jasper viewer...weird?
From reviewing other threads, this appears to be related to a server setting somewhere.  It is odd that the SQL captures the correct HH.mm.ss using the to_char, but the sysdate that is captured has a different HH.mm.ss.

Link to comment
Share on other sites

OK!  Finally got it(time zone setting corrected) after reading every thread I could find regarding time zone...the datasource time.  This is best noted in the JasperServer project.  Screen shot attached, note the blue section of the datasource set up...LEAVE IT BLANK if your DB already reflects the correct time.

Any notes on the Hour:Minute:Second parameter prompt would be much appreciated!

Thank You,
Chris

Link to comment
Share on other sites

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...