473,396 Members | 2,085 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Pass variable to Oracle Query form Crystal Reports

I want to pass a date variable to a sql statement from Crystal
Reports. The part of the query accepting the variables looks like:

"Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and
To_Date('30-JUN-03','mm/dd/yy')"

And I'd be wanting to replace the date part of the query with a
user-entered date. As I'm new to Oracle and Crystal, I don't know
where to start. Is there a way to replace the '1-JUN-03' part with a
variable in Oracle, then modify that variable when I'm designing the
report?

Grabbing all the results and then filtering them in Crystal won't work
as this table is very large. Apologies in advance if this question
has been asked a million times.

--Wayne
Jul 19 '05 #1
4 9608
Wayne Baswell wrote:
I want to pass a date variable to a sql statement from Crystal
Reports. The part of the query accepting the variables looks like:

"Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and
To_Date('30-JUN-03','mm/dd/yy')"

And I'd be wanting to replace the date part of the query with a
user-entered date. As I'm new to Oracle and Crystal, I don't know
where to start. Is there a way to replace the '1-JUN-03' part with a
variable in Oracle, then modify that variable when I'm designing the
report?

Grabbing all the results and then filtering them in Crystal won't work
as this table is very large. Apologies in advance if this question
has been asked a million times.

--Wayne


Your statement will not work - the date format differs too much from
the date offered - result will be an ORA-1860 (iirc)
'1-JUN-03','dd-mon-yy', or: '7/1/03','mm/dd/yy'
--
Regards, Frank van Bortel

Jul 19 '05 #2
You are correct. But I'm most concerned with finding a way to pass a
user entered variable to the query. Any ideas?

Thanks,

Wayne

Frank <fb*****@nescape.net> wrote in message news:<br**********@news2.tilbu1.nb.home.nl>...
Wayne Baswell wrote:
I want to pass a date variable to a sql statement from Crystal
Reports. The part of the query accepting the variables looks like:

"Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and
To_Date('30-JUN-03','mm/dd/yy')"

And I'd be wanting to replace the date part of the query with a
user-entered date. As I'm new to Oracle and Crystal, I don't know
where to start. Is there a way to replace the '1-JUN-03' part with a
variable in Oracle, then modify that variable when I'm designing the
report?

Grabbing all the results and then filtering them in Crystal won't work
as this table is very large. Apologies in advance if this question
has been asked a million times.

--Wayne


Your statement will not work - the date format differs too much from
the date offered - result will be an ORA-1860 (iirc)
'1-JUN-03','dd-mon-yy', or: '7/1/03','mm/dd/yy'

Jul 19 '05 #3
"Wayne Baswell" wrote...
You are correct. But I'm most concerned with finding a way to pass a user entered variable to the query. Any ideas?

Thanks,

Wayne


Hi Wayne,

maybe a 'Crystal reports' group or forum could offer some help?

Sorry, no help,
Guido
Jul 19 '05 #4
I have found out that there is no way to bind a variable to the Select
statement from Crystal Reports. This has to be done with stored
procedures.

--Wayne
Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: kristoff plasun | last post by:
I have a problem with a C++ DCOM application that prints Crystal Reports with data from Oracle. The SQL query is relatively complex but when the report is printed from the Crystal Reports...
7
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time =...
3
by: Don Wash | last post by:
Hi There! I've posted a few days back about this issue but no solutions has been found and that's why I'm re-posting this. I'm using built-in CrystalReport that comes with VS.NET 2003 to...
4
by: Corrado Valiente | last post by:
Hi all, I am thinking about becoming an Oracle developer. I have experience with Centura Team Developer AKA SQLWindows, this is a front-end developer environment for a variety of of database...
0
by: Big George | last post by:
Hello, I'm working with Visual Studio 2003 .NET and Crystal Reports for .NET. Database: Oracle 10g Develop PC: Windows XP I'm having problems trying to design a Crystal Report connecting to...
2
by: Bob Alston | last post by:
If you have an access form with record source being a straightforward query and where clause in the form definition, will the query be sent to the back end jet/Access database and executed there,...
7
by: Jlo | last post by:
Hi, I have a c# winforms application. When I call the report file, it shows me all the records in the table. How can I make it to call only a particular range. i have the following code...
11
by: =?Utf-8?B?cmtibmFpcg==?= | last post by:
How can I stop receiving this message while calling a crystal report? "The report you requested requires further information." Thanks
4
by: Wayne Baswell | last post by:
I want to pass a date variable to a sql statement from Crystal Reports. The part of the query accepting the variables looks like: "Calendar_Date between To_Date('1-JUN-03','mm/dd/yy') and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.