Jump to content

Single Select Query (Date) Datatype


bckeen

Recommended Posts

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

 You can use String for visible parameter, and show your available dates from the DB, and then have a second hidden parameter which you use for the report query:

<parameter name="P_DateString" isForPrompting="true" class="java.lang.String" />

<parameter name="P_Date" isForPrompting="false" class="java.util.Date">

  <defaultValueExpression><![CDATA[new java.text.SimpleDateFormat("--your--pattern--").parse($P{P_DateString})]]></defaultValueExpression>

</parameter>

P_DateString is what InputControl sets up, and P_Date is what you user in your SQL query.
Link to comment
Share on other sites

  • 1 year later...

hi bckeen,

 

i want to use your code to change the format of the calender but i dont know how can i use it , where can i put this code ? excuse me im a new user of jasper i try to understand some carasteristic of this opensource^^

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