Jump to content
Changes to the Jaspersoft community edition download ×

How to set default date-timestamps format in jasperserver


mlopez_1

Recommended Posts

Hi all, I'd like to configure the jaserserver 5.5.0 in linux server with jdk 7  for defaults formats for date and timestamps values for all reports.

I mean, if no pattern set for a text field, de default format must act.

I follow the instructions in Administrator Guide PDF and query about two days in this forum and the rest of internet.

Modified the file:

  jasperreports-server-cp-5.5.0/apache-tomcat/webapps/jasperserver/WEB-INF/bundles/jasperserver_config_es.properties

with this content:

# Used for parsing and formatting dates by server
date.format=dd/MM/yyyy
datetime.format=dd/MM/yyyy HH:mm:ss
time.format=HH:mm:ss

# Used for parsing and formatting dates by calendar component (UI).
# Pattern for date should match appropriated pattern from server properties.
# The format for calendar component can be combinations of the following:
# d  - day of month (no leading zero)
# dd - day of month (two digit)
# o  - day of year (no leading zeros)
# oo - day of year (three digit)
# D  - day name short
# DD - day name long
# m  - month of year (no leading zero)
# mm - month of year (two digit)
# M  - month name short
# MM - month name long
# y  - year (two digit)
# yy - year (four digit)
calendar.date.format=dd/mm/yy
calendar.datetime.format=dd/mm/yy HH:mm:ss
calendar.time.format=HH:mm:ss
# Current calendar component supports only patterns with time after date ("hh:mm M dd, yy" will not work)
# The datetime component is configured by calendar.date.format and calendar.time.format
calendar.datetime.separator=u0020

# Additional validation of dates in AdHoc filter and other parts of UI
validation.date.pattern=/^\d{2}-\d{2}-\d{4}$/
validation.datetime.pattern=/^\d{2}-\d{2}-\d{4}\s\d{2}:\d{2}:\d{2}$/
validation.time.pattern=/^\d{2}:\d{2}:\d{2}$/

report.scheduling.output.format.1=pdf
report.scheduling.output.format.2=html
report.scheduling.output.format.3=xls
report.scheduling.output.format.4=rtf
report.scheduling.output.format.5=csv
report.scheduling.output.format.6=odt
report.scheduling.output.format.7=txt
report.scheduling.output.format.8=docx
report.scheduling.output.format.9=ods
report.scheduling.output.format.10=xlsx

# The substitution value being used in password input forms avoiding the real password appears in HTML
input.password.substitution=~value~subst~

Whe I use a textfield with a java.sql.Timestamp field always display in dd/MM/yy HH:mm format, even modifying the file:

  jasperreports-server-cp-5.5.0/apache-tomcat/webapps/jasperserver/WEB-INF/bundles/jasperserver_config.properties

Always display in dd/MM/yy HH:mm format

The $P{REPORT_LOCALE} parameter is 'es_ES', so I have created a file named:

   jasperreports-server-cp-5.5.0/apache-tomcat/webapps/jasperserver/WEB-INF/bundles/jasperserver_config_es_ES.properties

But nothing works

I have tried the Expression Class's Text field with String, java.sql.Timestamp, ... nothing.

Please I need help,

 

Regards

 

Link to comment
Share on other sites

  • 4 years later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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