Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CRAXDRT A month number must be between 1 and 12

Status
Not open for further replies.

szeiss

Programmer
Apr 5, 2000
137
US
Using Oracle 10, Coldfusion, CR 8.5 on desktop and CR 11.5 on server.

Keep getting this error when I press submit to run report, "A month number must be between 1 and 12". I've changed the parameters in the report to use DateSerial, but still doesn't work, keep getting the same error.

Here is the form code used to submit the report -
[
<cfimport taglib="../customtag" prefix="xxxx">
<xxxx:layout>
<h2>Mileage By Employee Report</h2>

<cfif NOT isDefined("form.filter")>
<form name="ReportFilter" method="post" onsubmit="return checkForm();">
<cfinclude template="report_filter_dates.cfm">
<input type="hidden" name="filter" value="Y">
<button type="submit">Submit</button>
</form>
<cfelse>
<script src="#application.libSrc#windows.js" type="text/javascript"></script>
<cfparam name="StartDate" type="date" default="#now()#">
<cfparam name="EndDate" type="date" default="#Now()#">
<CFSET USERNAME = '#session.objUser.getProp('user_name')##RAND()#'>
<CFSET ReportPath = "
<cfset ReportName = "MileageByEmployee.rpt">
<!--- NO STORED PROC CALLED FOR THIS REPORT --->
<CFOUTPUT>
<form action="#ReportPath#" method="POST" name="parmform">
<INPUT NAME="P1" VALUE="#CreateDate(year(StartDate), month(StartDate), day(StartDate))#" TYPE="Hidden">
<INPUT NAME="P2" VALUE="#CreateDate(year(EndDate), month(EndDate), day(EndDate))#" TYPE="Hidden">
<INPUT NAME="ReportName" VALUE="#ReportName#" TYPE="Hidden">
</FORM>
</CFOUTPUT>

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function openreportwindow( parmform ) {
window.open( '', 'reportviewerwindow', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes')
parmform.target = "reportviewerwindow";
parmform.submit();
}

openreportwindow(document.parmform);
history.go(-1);
//-->
</SCRIPT>
</cfif>
</xxxx:layout>]

Here is the code for the calendar -
[
<table>
<tr>
<td valign="middle" width="120"><strong>Start Date:</strong></td>
<td valign="top"><input type="text" name="StartDate" size="10" maxlength="10" onblur="isValidDate(this.value,this);"><a href="javascript:cal_1.popup();"><img src="/images/calendar.gif" border="0" alt="Click Here to Pick up the date"></a></td>
</tr>
<tr>
<td valign="middle" width="120"><strong>End Date:</strong></td>
<td valign="middle"><input type="text" name="EndDate" size="10" maxlength="10" onblur="isValidDate(this.value,EndDate);"><a href="javascript:cal_2.popup();"><img src="/images/calendar.gif" border="0" alt="Click Here to Pick up the date"></a></td>
</tr>
</table>
<cfoutput>
<script language="javascript" src="#application.libSrc#calendar.js" type="text/javascript"></script>
<script src="#application.libSrc#customValidator.js" type="text/javascript"></script>
</cfoutput>
<script language="JavaScript">
var cal_1 = new calendar2(document.forms['ReportFilter'].elements['StartDate']);
var cal_2 = new calendar2(document.forms['ReportFilter'].elements['EndDate']);
</script>]

Any ideas on what I'm doing wrong? Upgrading CR 8.5 to 11.5 is not an option.

Thanks,
Sherry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top