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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crystal 8.0 - Oracle 8 Date Parameter Issue

Status
Not open for further replies.

Max12345

Programmer
Sep 4, 2003
5
US
I am working on a Crystal 8.0 report which requires a Date parameter. Oracle 8 is the database. I am using the canned ASP pages from Seagate Software to display reports and prompt for parameters over the web. When creating parameters, 2 values are necessary. The first is passed to the Crystal report. The second is displayed in the DropDown listbox which is shown to the user for selection.

The Oracle SQL statement I have created for the date parameter is as follows:

Select Distinct(To_Char(ClaimDte,'DD-MON-YYYY')),ClaimDte as RealDate From ClaimFile Order by RealDate Desc

'DD-MON-YYYY is the default format for dates in Oracle. When this statement is run it returns the following values

01-AUG-2003,8/1/2003
01-JUL-2003,7/1/2003
01-OCT-2002,10/1/2002

When selecting 7/1/2003 from the Web, the value '1-JUL-2003' displays on the Crystal Report. The leading 0 on the day is truncated. The report comes up blank (no rows, just headers). When I run the report out of Crystal (using 01-JUL-2003 as the parm value), I receive rows. Even when I use 1-JUL-2003 as the parm, I get rows. Both the web and the DSN on my machine point to the same database.

I've went as far as hardcoding the date parm as '01-JUL-2003' and still get the same result over the web. Hope somebody can help. Thanks!!!!!!!!!!!!!!!
 
By default DATES are converted to chars (and vice versa) according to current NLS_DATE_FORMAT. You may change it in registry, set on session level by ALTER SESSION, or even pass directly to TO_DATE/TO_CHAR function.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top