Jump to content
Changes to the Jaspersoft community edition download ×

Chart Properties


abdul_b

Recommended Posts

How to change the parameter pattern for date in title expression in charts?

Example :

I have given title expression in chart as "STATISTICS FROM "+$P{start_date}+" TO "+$P{end_date}

Given input as 09/02/2008 for start_date parameter.

Given input as 09/02/2009 for end_date parameter.

While executing the report I get the ttile as STATISTICS FROM Tue Sep 02 00:00:00 GMT+5.30 2008 TO Wed Sep 02 00:00:00 GMT+5.30 2009

But I want the output as STATISTICS FROM 02/09/2008 TO 02/09/2009

For changing the pattern for start_date and end_date parameters what i want to do??

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

I recommend tutorial - great source of information. The thing you are looking for is probably here:

http://jasperforge.org/website/jasperreportswebsite/trunk/tutorial.html?group_id=252

 

<textFieldExpression>
   $F{FirstName} + " " + $F{LastName} + " was hired on " + 
   (new SimpleDateFormat("MM/dd/yyyy")).format($F{HireDate}) + "."
</textFieldExpression>

HTH,

Paweł

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