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

A problem passing Oracle date field as parameter

Status
Not open for further replies.

jdwalton

Programmer
Jun 13, 2003
10
0
0
US
I have a report that pulls data from oracle tables. I have 2 parameters set up to provide a date range to display on the report. These work fine within Crystal. My problem is when I open the report from within our application, the parameters are not showing and I believe it has to do with the date conversion issue with oracle. We have a solution to modify the SQL statement in other areas where we need to pull a date out of oracle, however I can't figure out how to make it happen from within crystal. The line in the SQL statement that fixes the issue is :

to_char(tblName.FieldName, 'MM/DD/YYYY') Beg_DT

The Beg_DT is an alias assigned to the field. I have played around with the select expert but cannot get the syntax right and I have been told if I mess with the actual SQL statement in Crystal, then it will mess up the parameters, causing them not to work. Any help is greatly appreciated.

Thanks.

Jim
 
Hi,

Just out of interest...

have you used the save data with report option ?

This will stop parameters from being requested.

Geoff
 
Yes I have, but the problem is that the parameters are a requirement. I need to be able to specify the date range for the data in the report. Thanks for the suggestion.

I guess what I really need is to know how to convert the date to a string within crystal.

Jim
 
An application can invoke parameters from within an SP, this sounds like an application defiency.

You can create a SQL Expression (Insert->Field Object->right click SQL Expression and select new) within Crystal to contain:

to_char(tblName.FieldName, 'MM/DD/YYYY') Beg_DT

You'r question doesn't really make sense to me, but hopefully this will provide a workaround for you.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top