473,698 Members | 2,796 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Date format when passing to crystal reports

I'm passing two date parameters into a crystal report but it won't let me
input anythign other than mm/dd/yy. What I want to put in is dd/mm/yy. Here
is my code:

Dim cr As New cleaningHistory

Dim objParameterFie ldDefinition As
CrystalDecision s.CrystalReport s.Engine.Parame terFieldDefinit ion

Dim objParameterVal ues As CrystalDecision s.Shared.Parame terValues

Dim objParameterDis creteValue As
CrystalDecision s.Shared.Parame terDiscreteValu e

'Set the parameter name on the next line

objParameterFie ldDefinition =
cr.DataDefiniti on.ParameterFie lds.Item("Start ")

objParameterVal ues = New CrystalDecision s.Shared.Parame terValues

objParameterDis creteValue = New
CrystalDecision s.Shared.Parame terDiscreteValu e

'Set the parameter value on the next line

objParameterDis creteValue.Valu e = CDate(txtStart. Text)

objParameterVal ues.Add(objPara meterDiscreteVa lue)

objParameterFie ldDefinition.Ap plyCurrentValue s(objParameterV alues)

'Set the parameter name on the next line

objParameterFie ldDefinition = cr.DataDefiniti on.ParameterFie lds.Item("End")

objParameterVal ues = New CrystalDecision s.Shared.Parame terValues

objParameterDis creteValue = New
CrystalDecision s.Shared.Parame terDiscreteValu e

'Set the parameter value on the next line

objParameterDis creteValue.Valu e = CDate(txtEnd.Te xt)

objParameterVal ues.Add(objPara meterDiscreteVa lue)

objParameterFie ldDefinition.Ap plyCurrentValue s(objParameterV alues)

Table1.BgColor = "White"

CrystalReportVi ewer1.Visible = True

CrystalReportVi ewer1.ReportSou rce = cr

btnOpenReport.V isible = False

btnRefresh.Visi ble = True

The acess db i'm getting the data off is set to dd/mm/yy what else could i
be forgetting?

cheers

Jul 21 '05 #1
0 1388

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

Similar topics

0
1723
by: Scott Hatfield | last post by:
Hello, all. I'm a newbie to Python and am using it to interface with crystal reports via com/activex. I have had wonderful success thus far, but am unable to pass a parameter of type 'date.' I tried using a PyTime object, but it would not work for a date parameter. It *does* work for a datetime. I searched comp.lang.python and found one person who had this same problem (though not with crystal reports), but no replies were posted.
7
682739
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
8
3632
by: John Wildes | last post by:
Hello all I'm going to try and be brief with my question, please tell me if I have the wrong group. We are querying transaction data from a DB3 database application. The dates are stored as text fields. Each date for example 10/31/03 or October 31st 2003 is stored as 10/31/A3 in the system. My reasoning for this is because they couldn't solve their Y2K problem or this is their solution to it. All dates prior to 2000 are stored...
0
1097
by: John Smith | last post by:
I'm passing two date parameters into a crystal report but it won't let me input anythign other than mm/dd/yy. What I want to put in is dd/mm/yy. Here is my code: Dim cr As New cleaningHistory Dim objParameterFieldDefinition As CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition
8
4425
by: Ryan | last post by:
Hello, I'm new to Access and DB's in general. I've taken over some light duty support for a lab information system we use in house. Most of our dates are reported as "10/31/2006 12:30:00 PM" (With seconds listed in the report field). However, nobody wants to see the seconds. So I tried to format it =Format(DateCollected, "mm/dd/yy hh:nn AM/PM"). Works great, right? Well.. yeah for the most part. However if we
6
7816
by: Smish | last post by:
hey all, I am passing parameters through code to a stored procedure in both windows application (using c# and sql server & crystal reports)and web application(using asp.net & sql server & crystal reports)... the windows application works perfectly.. bt web apllication gives exception..."Invalid Table Number"... Can nebdy help...Please......
0
3861
by: tchaps | last post by:
Hi, I am trying to learn how to use Crystal Reports to create a custom invoice for Simply Accounting. I am using Simply accounting 2007 nd crystal reports 8 I am unsure how to properly use the fields in Crystal reports and do not know how to insert new fields from simply data Also, I am wondering how the table system works in crystal reports.
1
1784
by: kizmar | last post by:
I'm having an issue with a stored procedure I'm working on. One of the parameters is a DATE field. I'm attaching to this stored procedure with Crystal Reports, which is passing something like "2007-12-20" to the stored procedure. When I try to use this variable (parameter) in a dynamic SQL statement, it keeps converting it to "2007 minus 12 minus 20" or "1975". I haven't been able to find away around this. I want to filter records based on...
1
5996
by: dhanashivam | last post by:
Hi All, I have a crystal report document which is opened from my asp.net 2.0 application (C# code). In the design time i fixed my date fields as MM/dd/yyyy format. but now we are going to implement the project in different culture. so now i need to change the format of date field at run time thru asp.net 2.0 (C#). Help is highly appriciated. Thanks in Advance.
0
8683
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
8609
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
9031
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
8901
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
8871
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...
0
5862
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
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
3052
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
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.