Skip to main content
Inspiring
February 13, 2013
Question

DateTime Parameter being passed maybe blank

  • February 13, 2013
  • 1 reply
  • 784 views

I have a Transcript report and I only want to print any other institude name and credit earned (transfer information) that occurred before the student graduated. I am selecting only the institudes that have a 'receive date' prior to the 'grad date'. This works great on the students that have graduated. If they haven't graduated the 'grad date' is empty and I error out when comparing it to the receive date. Here is the query that calls the transfer information:

select

nmedu.soc_sec, nmedu.credits, nmedu.date_rec, institut.inst_txt, institut.homeinst, nmedu.graduated

from nmedu, institut

where institut.inst_cod = nmedu.inst_cod

and institut.homeinst = 0

and nmedu.credits <> 0

and nmedu.soc_sec = '#param.socsec#'

and nmedu.date_rec = '#param.graddate1#'

ORDER BY  inst_txt

When the student has not graduated I get the following error message:

Incompatible java.lang.String value assigned to parameter GradDate1 in the ColdFusionReport dataset.


If they have graduated it works great.

I'm running on CF 9.

This topic has been closed for replies.

1 reply

EddieLotter
Inspiring
September 17, 2013

Try something like the following:

and nmedu.date_rec = #iif( isDate(param.graddate1), createOdbcDate(param.graddate1), de("NULL"))#