G
Guest
I'm trying to run a report using a form containing a crystal report viewer, but I keep getting an error saying tha
"The specified value type is different to the current value type
I'm trying to use date parameters. The parameter is set up as a date in the report
Here's the code
Dim paramfields As New CrystalDecisions.Shared.ParameterField
Dim discreteval As New CrystalDecisions.Shared.ParameterDiscreteValu
Dim reporter As New bdb.frmReportViewe
Dim report As CrystalDecisions.CrystalReports.Engine.ReportDocumen
report = Nothin
report = New DetForAcc
reporter.ReportFileName = repor
Dim paramfield2 As New CrystalDecisions.Shared.ParameterFiel
paramfield2.ParameterValueKind = CrystalDecisions.[Shared].ParameterValueKind.DateParamete
paramfield2.ParameterFieldName = "EffectiveLow
discreteval.Value = dtpStart.Value.Dat
paramfield2.CurrentValues.Add(discreteval
paramfields.Add(paramfield2
reporter.ReportParameters = paramfield
reporter.MdiParent = Me.MdiParen
reporter.Show(
Any ideas
Thanks, Matt
"The specified value type is different to the current value type
I'm trying to use date parameters. The parameter is set up as a date in the report
Here's the code
Dim paramfields As New CrystalDecisions.Shared.ParameterField
Dim discreteval As New CrystalDecisions.Shared.ParameterDiscreteValu
Dim reporter As New bdb.frmReportViewe
Dim report As CrystalDecisions.CrystalReports.Engine.ReportDocumen
report = Nothin
report = New DetForAcc
reporter.ReportFileName = repor
Dim paramfield2 As New CrystalDecisions.Shared.ParameterFiel
paramfield2.ParameterValueKind = CrystalDecisions.[Shared].ParameterValueKind.DateParamete
paramfield2.ParameterFieldName = "EffectiveLow
discreteval.Value = dtpStart.Value.Dat
paramfield2.CurrentValues.Add(discreteval
paramfields.Add(paramfield2
reporter.ReportParameters = paramfield
reporter.MdiParent = Me.MdiParen
reporter.Show(
Any ideas
Thanks, Matt