Jump to content
Changes to the Jaspersoft community edition download ×

2005 IR Help

Recommended Posts

By: Josh Batchelor - djcrazysk8er

Date Help

2004-03-05 22:02

I have racked my brain, and I cannot figure this out. I am passing in 2 dates the start date and teh end date. They are in this format 03-05-2004. Now I want to use it in the sql, but when I try the date shows up as Thu Mar.... Here is my XML any help would be great.


<parameter name="EntryDate" class="java.util.Date">

<parameterDescription><![CDATA[Please enter an entry date]]></parameterDescription>

<defaultValueExpression><![CDATA[new java.sql.Date()]]></defaultValueExpression>


<parameter name="EndDate" class="java.util.Date">

<parameterDescription><![CDATA[Please enter an end date]]></parameterDescription>

<defaultValueExpression><![CDATA[new java.sql.Date()]]></defaultValueExpression>











INNER JOIN sessionorders ON (customer_info.session_id = sessionorders.session_id)

INNER JOIN images ON (sessionorders.id = images.id)

INNER JOIN stores ON (customer_info.store_number = stores.store_id)


sessionorders.is_completed = 1

AND $P!{EntryDate} <= customer_info.entryDate

AND customer_info.entryDate <=$P!{EndDate}


GROUP BY sessionorders.id]]></queryString>





By: David Lim - aberrant80

RE: Date Help

2004-03-06 21:54

don't know about every1 else, but i just used a DateFormat.





By: Teodor Danciu - teodord

RE: Date Help

2004-03-07 00:32




Do not use the $P!{} syntax, because it includes

your dates in the query converted as Strings and you

don't want that.

You just want to pass them as parameters to your

query and you should use the $P{} syntax.


I hope this helps.







By: Giuseppe Bressan - gusbress

RE: Date Help

2004-12-14 06:14

I have thi query:

"SELECT tdipendenti.*

FROM tdipendenti INNER JOIN...


WHERE (tscadenzedipendenti.SCDPFINE >= $P{DATA}"


"<parameter name="DATA" isForPrompting="false" class="java.sql.Date"/>"

but when i try to compile have this error:

"java.lang.NullPointerException ????at?dori.jasper.engine.design.JRVerifier.verifyQuery(JRVerifier.java:373) ????at?dori.jasper.engine.design.JRVerifier.verifyDesign(JRVerifier.java:171)...."


where is my error?

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