[jasperreports-questions] Incompatible java.lang.String value assigned to parameter importDate

2009-10-19 Thread Greg Stephens
I'm a new user trying to pass a date as a parameter receiving
this Incompatible java.lang.String error from a groovy .gsp page 

Here's the .gsp fragment where importDate is a groovy Date: 

g:jasperReport jasper=reportSec3 format=HTML name=Securities by 
Class 
  input type=hidden name=importDate 
value=${holdingImportDateInstance.importDate}/
/g:jasperReport 

and the jrxml 

jasperReport xmlns=http://jasperreports.sourceforge.net/jasperreports; 
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; 
xsi:schemaLocation=http://jasperreports.sourceforge.net/jasperreports 
http://jasperreports.sourceforge.net/xsd/jasperreport.xsd;
name=Sec3 language=groovy pageWidth=595 pageHeight=842
columnWidth=535 leftMargin=20 rightMargin=20 topMargin=20
bottomMargin=20 
parameter name=importDate class=java.util.Date 
defaultValueExpression![CDATA[]]/defaultValueExpression 
/parameter
queryString 
![CDATA[SELECT 
 holding.`symbol_id` AS holding_symbol_id, 
 holding.`market_value` AS holding_market_value, 
 security.`asset_class` AS security_asset_class, 
 security.`symbol` AS security_symbol, 
 holding_import_date.`import_date` AS holding_import_date_import_date, 
 security.`name` AS security_name, 
 holding.`date_id` AS holding_date_id, 
 holding_import_date.`id` AS holding_import_date_id 
FROM 
 `security` security INNER JOIN `holding` holding ON security.`id` = 
holding.`symbol_id` 
 INNER JOIN `holding_import_date` holding_import_date ON holding.`date_id` 
= holding_import_date.`id` 
WHERE 
 holding_import_date.`import_date` = $P{importDate}


  --
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions


[jasperreports-questions] Incompatible java.lang.String value assigned to parameter importDate

2009-10-19 Thread gstephens

I'm a new ireport user trying to pass a date as a parameter receiving this
Incompatible java.lang.String error from a groovy .gsp page

Here's the .gsp fragment where importDate is a groovy Date:

g:jasperReport jasper=reportSec3 format=HTML name=Securities by
Class
  input type=hidden name=importDate
value=${holdingImportDateInstance.importDate}/
/g:jasperReport

and the jrxml

jasperReport xmlns=http://jasperreports.sourceforge.net/jasperreports;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xsi:schemaLocation=http://jasperreports.sourceforge.net/jasperreports
http://jasperreports.sourceforge.net/xsd/jasperreport.xsd; name=Sec3
language=groovy pageWidth=595 pageHeight=842 columnWidth=535
leftMargin=20 rightMargin=20 topMargin=20 bottomMargin=20
parameter name=importDate class=java.util.Date
defaultValueExpression![CDATA[]]/defaultValueExpression
/parameter
queryString
![CDATA[SELECT
 holding.`symbol_id` AS holding_symbol_id,
 holding.`market_value` AS holding_market_value,
 security.`asset_class` AS security_asset_class,
 security.`symbol` AS security_symbol,
 holding_import_date.`import_date` AS holding_import_date_import_date,
 security.`name` AS security_name,
 holding.`date_id` AS holding_date_id,
 holding_import_date.`id` AS holding_import_date_id
FROM
 `security` security INNER JOIN `holding` holding ON security.`id` =
holding.`symbol_id`
 INNER JOIN `holding_import_date` holding_import_date ON
holding.`date_id` = holding_import_date.`id`
WHERE
 holding_import_date.`import_date` = $P{importDate}

-- 
View this message in context: 
http://www.nabble.com/Incompatible-java.lang.String-value-assigned-to-parameter-importDate-tp25710271p25710271.html
Sent from the jasperreports-questions mailing list archive at Nabble.com.


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
jasperreports-questions mailing list
jasperreports-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jasperreports-questions