473,397 Members | 1,985 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,397 software developers and data experts.

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 objParameterFieldDefinition As
CrystalDecisions.CrystalReports.Engine.ParameterFi eldDefinition

Dim objParameterValues As CrystalDecisions.Shared.ParameterValues

Dim objParameterDiscreteValue As
CrystalDecisions.Shared.ParameterDiscreteValue

'Set the parameter name on the next line

objParameterFieldDefinition =
cr.DataDefinition.ParameterFields.Item("Start")

objParameterValues = New CrystalDecisions.Shared.ParameterValues

objParameterDiscreteValue = New
CrystalDecisions.Shared.ParameterDiscreteValue

'Set the parameter value on the next line

objParameterDiscreteValue.Value = CDate(txtStart.Text)

objParameterValues.Add(objParameterDiscreteValue)

objParameterFieldDefinition.ApplyCurrentValues(obj ParameterValues)

'Set the parameter name on the next line

objParameterFieldDefinition = cr.DataDefinition.ParameterFields.Item("End")

objParameterValues = New CrystalDecisions.Shared.ParameterValues

objParameterDiscreteValue = New
CrystalDecisions.Shared.ParameterDiscreteValue

'Set the parameter value on the next line

objParameterDiscreteValue.Value = CDate(txtEnd.Text)

objParameterValues.Add(objParameterDiscreteValue)

objParameterFieldDefinition.ApplyCurrentValues(obj ParameterValues)

Table1.BgColor = "White"

CrystalReportViewer1.Visible = True

CrystalReportViewer1.ReportSource = cr

btnOpenReport.Visible = False

btnRefresh.Visible = 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 1376

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

Similar topics

0
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.' ...
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 =...
8
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...
0
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 ...
8
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"...
6
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...
0
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...
1
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...
1
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...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
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...
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...
0
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,...
0
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...

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.