473,787 Members | 2,798 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VB Oracle Crystal Reports date problem

10 New Member
Hi all

rr.SQLQuery = "select * from EXPORT where to_date(PLACEME NTDATE, 'DD/MM/YYYY') < TO_DATE('" & Format("17/08/2007", "YYYY/MM/DD") & "', 'YYYY/MM/DD') "

while executing the above querry im getting runtime error 2053 vb oracle8 and crystal report. Please help me to solve this urgent.


Renjith
Oct 29 '07 #1
21 2505
debasisdas
8,127 Recognized Expert Expert
The sql query is parsed at database level ,remove the format function from the SQL string . Try to use oracle only syntax.
Oct 29 '07 #2
renjukarsf
10 New Member
The sql query is parsed at database level ,remove the format function from the SQL string . Try to use oracle only syntax.
I already tried with following sql , but the same error , please help

rr.SQLQuery = "select * from EXPORT where to_date(PLACEME NTDATE, 'YYYY/MM/DD') < TO_DATE('200/17/10', 'YYYY/MM/DD') "
Oct 30 '07 #3
debasisdas
8,127 Recognized Expert Expert
Kindly post the exact error message with error number.
Oct 30 '07 #4
debasisdas
8,127 Recognized Expert Expert
I already tried with following sql , but the same error , please help

rr.SQLQuery = "select * from EXPORT where to_date(PLACEME NTDATE, 'YYYY/MM/DD') < TO_DATE('200/17/10', 'YYYY/MM/DD') "
The date that you are passing is wrong. How can the month be 17.and the year 200?
If the placement date is already a date field, no need to convert it again.
Try the following syntax.

select * from EXPORT where PLACEMENTDATE < TO_DATE('2007/10/17', 'YYYY/MM/DD')

Hope that solves your problem.
Oct 30 '07 #5
renjukarsf
10 New Member
The date that you are passing is wrong.How month can be 17.and year 200.
If the placement data is already a date field no need to convert it again .
Try the following syntax.

select * from EXPORT where PLACEMENTDATE < TO_DATE('2007/10/17', 'YYYY/MM/DD')

Hope that solves your probelm.
Exact error number is :20534. Due to over sight i posted worng querry , the correct one is

rr.SQLQuery = "select * from EXPORT where to_date(PLACEME NTDATE, 'YYYY/MM/DD') < TO_DATE('2007/10/17', 'YYYY/MM/DD') "
Oct 30 '07 #6
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

When using CR, Create the Report with all the required fields, and Instead of Changing the SQL Query From VB,
Just use "SelectionFormu la" (before viewing/Showing/Printing the report) to Filter out Records say :

Expand|Select|Wrap|Line Numbers
  1. rr.SelectionFormula = "{EXPORT.PlacementDate}< Date( "  _
  2. & Format("17/08/2007", "YYYY,MM,DD") & ") "
  3.  
For Higher Versions of CR it shud be : rr.RecordSelect ionFormula

Regards
Veena
Oct 30 '07 #7
renjukarsf
10 New Member
Hi,

When using CR, Create the Report with all the required fields, and Instead of Changing the SQL Query From VB,
Just use "SelectionFormu la" (before viewing/Showing/Printing the report) to Filter out Records say :

Expand|Select|Wrap|Line Numbers
  1. rr.SelectionFormula = "{EXPORT.PlacementDate}< Date( "  _
  2. & Format("17/08/2007", "YYYY,MM,DD") & ") "
  3.  
For Higher Versions of CR it shud be : rr.RecordSelect ionFormula

Regards
Veena
Hi veena

Thanks for your help.
My field 'placementdate' is in dd/mm/yyyy format . please lookinto below and reply wht is the error . I want compare date for generating report from oracle. Im yotaly new in Crystalreport , please guide

rr.SelectionFor mula = "Format({EXPORT .PlacementDate} ,'YYYY/MM/DD') < Date( " _
& Format(frmdt, "YYYY/MM/DD") & ") "

rr.SQLQuery = "select * from EXPORT "
Oct 30 '07 #8
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Dont Format, Dont Pass SQLQuery. If report is designed properly(with Tables), you need not pass SQLQuery to report..
Just pass the Selection Formula as I said in my Previous Post. and What is the version of ur CR..?
For CR8 and above it is CR.RecordSelect ionFormula

Regards
Veena
Oct 30 '07 #9
renjukarsf
10 New Member
Hi,

Dont Format, Dont Pass SQLQuery. If report is designed properly(with Tables), you need not pass SQLQuery to report..
Just pass the Selection Formula as I said in my Previous Post. and What is the version of ur CR..?
For CR8 and above it is CR.RecordSelect ionFormula

Regards
Veena
Hi

Your previous post gives me wrong report. Im not getting the report according to my comparison

EG: im selecting date lessthan 11/07/20007 it shows all records

Thanks
Renjith
Oct 30 '07 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

1
19184
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal Report at runtime? Example: private void button1_Click(object sender,
13
15180
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 designer it shows up very fast. When the report is printed from my application it takes about ten times as long to get the report to appear. When printing straight from the Crystal Reports
4
9644
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 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...
7
682763
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 = '01-SEP-02' I'm getting no results. The date_and_time field is formatted like this: 2002-SEP-02 00:01:04
0
2608
by: Max | last post by:
Hi wise people, Has anyone encountered the Crystal Reports problem I describe below? If so, how did you solve it? It seems that every article posted on google regarding CR and logon problems is still unanswered. I think I'm cursed. I originally created a crystal report which connects to a sql server server db on the same dev machine and it worked just fine. I tried to move it to another computer, but now I have to connect to an Oracle...
7
5026
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
0
2306
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 Oracle 10g using Microsoft OLE DB Provider for Oracle. I got this error: "ADO Error Code 0x80004005"
11
9698
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
6
6588
by: G. Stoynev | last post by:
I can't seem to be able to prevent a Crystal Reports formula to evaluate an expression when the report contains no records to show. Here's the formula (DateTransferred is a DateTime column): If IsNull({MyReportDataSet.DateTransferred}) Then " " //empty string Else If ({MyReportDataSet.DateTransferred} = CDate("1/1/1900")) Then " " //also pring an empty string - 1/1/1900 means "no date was
1
4745
by: annemariearmour | last post by:
I am using Crystal reports version 11.2 to create reports. The data source is SQL Server, and I am using views rather than reporting directly from tables. I apply selection criteria to the incoming records at record level and at group level. For example, I may select all bill lines with a receipt date within a certain date range. This results in a list of bill lines within that date range. The records are grouped and values on the records...
0
9655
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4067
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.