Jump to content

Recommended Posts

Posted

I'm trying to utilize the date.format, datetime.format, and time.format values from the jasperserver_config.properties file selected for a JasperServer session in my JasperStudio report.  How can I do that?  I know how to format with a hard-coded value using SimpleDateFormat ( new SimpleDateFormat("MM/dd/yyyy").format($P{start_date}) ), but what I really want is new SimpleDateFormat(<date.format value from jasperserver_config.properties used for the session calling the report>).format($P{start_date}).

Thanks!

Chris Rombach

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Support got me the answer on this one.  There are settings you have to enable in the jasperreports.properties file with your locales to determine the format used in jasperserver.

The ones I needed were:

net.sf.jasperreports.text.pattern.datetime

net.sf.jasperreports.text.pattern.date

net.sf.jasperreports.text.pattern.time

They can have extensions, if you're using multiple locales and utilize them

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