I have CF7.02 with a Microsoft Visual FoxPro 9.0 SP1 Database
that I connect to using ODBC (FoxPro Driver 6.01.8630.01). I send
my sql results to a CF Report Builder 7.02 PDF report and it works
fine. If I dump the date values before I change them, they look
like the following: {ts '2004-12-20 00:00:00'} . However I have
tried a number of ways of manipulating the date before sending it
to the report, but I continue to get errors. I don't care what
format they go to the report in, since the report reformats them
anyway. I checked to make sure that none of the dates were null.
For example <cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDateTime(#ldCFPrcInputDate#) /> yields values in the {ts '2004-12-20 00:00:00'} format when I dump the query results to screen. Where:
ldCFPrcInputDate = 12/20/2004
CreateODBCDateTime(ldCFPrcInputDate) = {ts '2004-12-20 00:00:00'}
ReportQuery.PrcInputDate[lcCurRow] = {ts '2004-12-20 00:00:00'}
I get the error:
Report data binding error Unable to get value for field 'prcinputdate' of class 'java.util.Date'.
coldfusion.runtime.OleDateTime -> Date
Not using the CreateODBCDate function for example <cfset ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# /> I get:
Report data binding error Unable to get value for field 'prcinputdate' of class 'java.util.Date'.
java.lang.String -> Date
Here are some of my failed attempts:
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDateTime(#ldCFPrcInputDate#) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# />
<cfset ReportQuery.PrcInputDate[lcCurRow] = DateFormat(CreateODBCDate(#ldCFPrcInputDate#),'mm/dd/yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm/dd/yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm-dd-yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = Trim(createODBCDateTime(ldtmpdate)) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate({05-07-2006}) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate('{05-07-2006}') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(05/07/2006) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate('05/07/2006')/>
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(parseDateTime('05/07/2006')) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = parseDateTime(CreateODBCDateTime(05/07/2006)) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = parseDateTime(CreateODBCDateTime('#ldCFPrcInputDate#')) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '{05-07-2006}' />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '{05/07/2006}' />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '05/07/2006' />
I also did some googling without success. Any help is appreciated.
For example <cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDateTime(#ldCFPrcInputDate#) /> yields values in the {ts '2004-12-20 00:00:00'} format when I dump the query results to screen. Where:
ldCFPrcInputDate = 12/20/2004
CreateODBCDateTime(ldCFPrcInputDate) = {ts '2004-12-20 00:00:00'}
ReportQuery.PrcInputDate[lcCurRow] = {ts '2004-12-20 00:00:00'}
I get the error:
Report data binding error Unable to get value for field 'prcinputdate' of class 'java.util.Date'.
coldfusion.runtime.OleDateTime -> Date
Not using the CreateODBCDate function for example <cfset ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# /> I get:
Report data binding error Unable to get value for field 'prcinputdate' of class 'java.util.Date'.
java.lang.String -> Date
Here are some of my failed attempts:
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDateTime(#ldCFPrcInputDate#) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = #ldCFPrcInputDate# />
<cfset ReportQuery.PrcInputDate[lcCurRow] = DateFormat(CreateODBCDate(#ldCFPrcInputDate#),'mm/dd/yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm/dd/yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(DateFormat(#ldCFPrcInputDate#,'mm-dd-yyyy') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = Trim(createODBCDateTime(ldtmpdate)) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate({05-07-2006}) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate('{05-07-2006}') />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(05/07/2006) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate('05/07/2006')/>
<cfset ReportQuery.PrcInputDate[lcCurRow] = CreateODBCDate(parseDateTime('05/07/2006')) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = parseDateTime(CreateODBCDateTime(05/07/2006)) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = parseDateTime(CreateODBCDateTime('#ldCFPrcInputDate#')) />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '{05-07-2006}' />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '{05/07/2006}' />
<cfset ReportQuery.PrcInputDate[lcCurRow] = '05/07/2006' />
I also did some googling without success. Any help is appreciated.