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

Date format changes from "February 20, 2017" to "F 20, 2017" when exported to excel


plar

Recommended Posts

Hi

We have a studio report where we are using "new java.util.Date()" field to populate the date in the report. The date field appears fine on the report but when exported to excel the format changes.

For example, In the report date field appears as "February 20, 2017" but when it is exported to excel it changes to "F 20, 2017". So, we have to manually format the filed in excel to short date and it appears as 2/20/2017.

Our objective is to eliminate the manual job to update the date filed format in excel, please suggest me ideas. 

Is there anything that we can do in Jaspersoft?

Thank you,

Arjun

Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I tried giving this property to report but it doesn't seem to be working. '

Went to Properties view and selecting "Advanced" tab and select "Misc" -> "Properties"

Name = net.sf.jasperreports.export.xls.pattern

Value = true

Any other sugegstion?

 

Link to comment
Share on other sites

1. try replacing the field with DATEFORMAT(new Date(), "MM/dd/yyyy" )
2. Enter the Source code of jrxml by clicking on the Source tab for the report
3. you should find some property name, value pairs like below
<property name="ireport.jasperserver.user" value="reportdev"/>
4. At the end of these properties copy below property and save/publish
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/>

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