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!

cfreport help 1

Status
Not open for further replies.

hp22015

Programmer
May 19, 2003
19
0
0
US
All

Please help!!!!

I am using CR 8.5, SQL Server 2000, Windows 2000 Server. Here is the script that I created to call my report:

<CFOUTPUT>#FORM.custID#</cfoutput>
<CFOUTPUT>#DateFormat('#FORM.birthFr#', &quot;mm/dd/yy&quot;)#</cfoutput>
<CFSET datestring = createODBCdate('#FORM.birthFr#')>
<CFOUTPUT>#datestring#</cfoutput>
<!---<CFOUTPUT>#DateFormat(createodbcdate(datestring), &quot;mm/dd/yy&quot;)#</cfoutput>--->
<CFREPORT REPORT=&quot;C:\Inetpub\{cust.CustID} LIKE '<CFOUTPUT>#FORM.custID#*</cfoutput>' AND
{cust.status} LIKE '<CFOUTPUT>#FORM.status#*</cfoutput>'
AND {cust.birthday} = '<CFOUTPUT>#datestring#</cfoutput>'
</CFREPORT>

As you can see from the first 2 lines, I can have the date displayed in any format that I want. However, I have the problem to pass the DATE parameter to the report. I get the error: &quot;An unexpected error occurred while using the Crystal Engine. Error number 500 ocurred.&quot; It's so weird because I can pass any number of strings that I want but when I have a DATE parameter, I get the error.

Can someone help me, please. Thanks.

HP
 
For the CR date, try using

datetime(2003,12,17,0,0,0)

HTH,

Phil Hegedusich
Senior Web Developer
IIMAK
-----------
Boy howdy, my Liberal Studies degree really prepared me for this....
 
Phil

You are the best person in the whole world. Thank you so much for your advice. Here is my code right now:

<CFSET datestring = #DateFormat('#FORM.birthFr#', &quot;yyyy,mm,dd&quot;)#>
<CFREPORT REPORT=&quot;C:\Inetpub\{cust.CustID} LIKE '<CFOUTPUT>#FORM.custID#*</cfoutput>' AND
{cust.status} LIKE '<CFOUTPUT>#FORM.status#*</cfoutput>'
AND {cust.birthday} = date (<CFOUTPUT>#datestring#</cfoutput>)
</CFREPORT>

It works like a charm. Thanks a lot.

HP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top