Jump to content
Changes to the Jaspersoft community edition download ×

setting default Value for Date field


2005 IR Help

Recommended Posts

By: David Rosenstark - drosenstark

setting default Value for Date field

2004-01-15 07:56

How do i set the default value for a java.util.Date field, especially if i do not want to use the current time?

 

 

 

 

By: Vinod Kumar Singh - vinodsingh

RE: setting default Value for Date field

2004-01-15 21:32

Make a date variable in your report and initialize it to desired date.

 

 

 

 

By: David Rosenstark - drosenstark

RE: setting default Value for Date field

2004-01-18 02:26

since the date is set by using a calendar in java 1.2+ and then doing a getTime to the Calendar, isnt this a problem?

 

 

 

 

 

 

By: Vinod Kumar Singh - vinodsingh

RE: setting default Value for Date field

2004-01-18 20:31

You can pass date as parameter to report.

 

 

 

 

By: David Rosenstark - drosenstark

RE: setting default Value for Date field

2004-01-19 00:58

yes, i am aware of that, but i am using jasperedit and i want default values so i can easily see my results

 

 

 

 

By: Vinod Kumar Singh - vinodsingh

RE: setting default Value for Date field

2004-01-19 21:21

Do like this-

 

<variable name="def_date" class="java.util.Date" resetType="Report" calculation="Nothing">

<initialValueExpression><![CDATA[new SimpleDateFormat().parse("07/10/2004 4:5 PM")]]>

</initialValueExpression>

</variable>

 

 

Vinod

 

 

 

 

By: David Rosenstark - drosenstark

RE: setting default Value for Date field

2004-01-20 03:41

Thanks!!

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