By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,592 Members | 1,958 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,592 IT Pros & Developers. It's quick & easy.

Date format when passing to crystal reports

P: n/a
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
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.