473,325 Members | 2,828 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,325 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

Nov 22 '05 #1
0 1086

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 =...
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: 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...
5
by: dgk | last post by:
How do folks handle a situation where a Date that is a column in a table isn't known for a particular row? Do we just leave it uninitialized and have it show up in reports as 1/1/0001or something?
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
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.