473,799 Members | 2,741 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
21 2508
debasisdas
8,127 Recognized Expert Expert
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
Do not blame others for your own mistake.

You need to change the query according to your requirment.
Oct 30 '07 #11
renjukarsf
10 New Member
Do not blame others for your own mistake.

You need to change the query according to your requirment.
Sorry you misunderstand , i just told what i got . The feedback i got was perfect i want to get as above , that only i mean , please advise
Oct 30 '07 #12
debasisdas
8,127 Recognized Expert Expert
what is the version of CR that you are using ?

have you tried this

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

in the SqlQuery of the crystal report .
Oct 30 '07 #13
renjukarsf
10 New Member
what is the version of CR that you are using ?

have you tried this

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

in the SqlQuery of the crystal report .
I already tried but it is giving runtime error 20534

crystal report 8
Oct 30 '07 #14
QVeen72
1,445 Recognized Expert Top Contributor
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
you passed date as 11/07/20007 , you will definately get wrong results...

What is the dateformat of your windows...?

Regards
Veena
Oct 31 '07 #15
debasisdas
8,127 Recognized Expert Expert
I already tried but it is giving runtime error 20534

crystal report 8
Are you able to execute the select statment from SQL* PLUS ?
Oct 31 '07 #16
renjukarsf
10 New Member
Are you able to execute the select statment from SQL* PLUS ?

My windows date format is DD/MM/YYYY . Im passing date through a variable. My sql querry is executing. While generating report through using crystal the date comparison is making trouble, really struck up
Oct 31 '07 #17
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

Pass this :

rr.RecordSelect ionFormula = "{EXPORT.Placem entDate} < Date( " _
& Format(frmdt, "YYYY, MM, DD") & ") "

CR follows a Particular Date Format, if you try to format it with "/", it may not accept.. and remove formatting for Fieldname also..

Regards
Veena
Oct 31 '07 #18
renjukarsf
10 New Member
Hi,

Pass this :

rr.RecordSelect ionFormula = "{EXPORT.Placem entDate} < Date( " _
& Format(frmdt, "YYYY, MM, DD") & ") "

CR follows a Particular Date Format, if you try to format it with "/", it may not accept.. and remove formatting for Fieldname also..

Regards
Veena
Hi
This gives me report with all the data in the database, comparison is not working, I think. For your reference I'm pasting the code. Please advise

Expand|Select|Wrap|Line Numbers
  1.         frmdt = Format(dtFrom.Value, "dd/mm/yyyy")
  2.         todt = Format(dtTo.Value, "dd/mm/yyyy")
  3.         rr.Reset
  4.         rr.WindowState = crptMaximized
  5.         rr.DiscardSavedData = True
  6.         rr.Formulas(0) = "PlacementDtFrom = '" & frmdt & "' "
  7.         rr.Formulas(1) = "PlacementDtTo = '" & todt & "' "
  8.         rr.Connect = "userid=xxxx;pwd=xxxx;server=xxxx"
  9.         rr.ReportFileName = App.Path + "\Report\AllPlacement.rpt"
  10.         rr.SelectionFormula = "{EXPORT.PlacementDate} <= Date( " _
  11.         & Format(frmdt, "YYYY,MM,DD") & ") and {EXPORT.PlacementDate} >= Date( " _
  12.         & Format(todt, "YYYY,MM,DD") & ")"
  13.         rr.SQLQuery = "select * from EXPORT"
  14.         rr.Action = 1
Oct 31 '07 #19
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

If it is for the period, there is a different syntax. You should have mentioned this before.
Check this :

Expand|Select|Wrap|Line Numbers
  1. rr.SelectionFormula = "{EXPORT.PlacementDate} In Date( " _
  2. & Format(frmdt, "YYYY,MM,DD") & ") To Date( " _
  3. & Format(todt, "YYYY,MM,DD") & ")"
  4.  
Try to check commenting the rr.SQLQuery part and check.

Regards
Veena
Oct 31 '07 #20

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

Similar topics

1
19187
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
15182
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
682767
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
5035
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
2309
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
9700
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
9688
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
9544
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10490
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...
0
10259
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10238
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
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5589
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4145
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
3
2941
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.