View Single Post
  #13 (permalink)  
Old May 16th, 2006, 04:22 AM
Prashu Prashu is offline
Authorized User
Join Date: May 2006
Location: Chennai, TN, India.
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Prashu

I have the following code to pass parameter field from vb6 to the crystal report developed in CR10 but I get an error message

"details: 01000:[microsoft][odbc driver manager] the driver doesn't support the version of ODBC behavior that the application requested(see SQLsetEnvAttr)."

Can anyone tell me how to solve this?

VB Code:

    Private Appl As New CRAXDRT.Application
    Private Report As New CRAXDRT.Report

Private Sub Command1_Click()
  Set Report = Appl.OpenReport("C:\Documents and Settings\prashanth_d01\Desktop\project1\Prjt3.rpt" )
        Report.EnableParameterPrompting = True
        Report.ParameterFields(1).ClearCurrentValueAndRang e
        Report.ParameterFields(1).AddCurrentValue "0"
        Report.ParameterFields(2).ClearCurrentValueAndRang e
        Report.ParameterFields(2).AddCurrentValue "0"
        Report.ParameterFields(3).ClearCurrentValueAndRang e
        Report.ParameterFields(3).AddCurrentValue "0"
    With CrystalActiveXReportViewer1
        .ReportSource = Report
        .RefreshEx True
   End With
        Set Appl = Nothing
End Sub

Reply With Quote