I am getting am Automation error with the following code. I am using CR 8.5 and a Access 98 MDB using ado.
cr1.ReportFileName = App.Path & "\claim2.rpt"
'set the database password so crystal reports can access the data.
cr1.Connect = gs_dbPassword
'set the location of the data for the main report.
cr1.DataFiles(0) = gs_DataFile
'set the location of the data for the sub-reports.
cr1.SubreportToChange = "diags"
cr1.DataFiles(0) = gs_DataFile
cr1.SubreportToChange = "Procs"
cr1.DataFiles(0) = gs_DataFile
' cr1.SubreportToChange = "CCIs"
' cr1.DataFiles(0) = gs_DataFile
'now tell crystal we're dealing with the main report again.
cr1.SubreportToChange = ""
'and set the record selection crietera.
cr1.SelectionFormula = "{pClaim.uid} = '" & mUID & "'"
'set the window caption so our claim number is displayed.
cr1.WindowTitle = "Print Claim: " & mProvname & " - " & Trim$(txtClaimNbr)
'now run the report and then turn the hourglass off.
'cr1.Action = 1
cr1.Action = 1
I get the error when I set the Action parameter to 1.
cr1.ReportFileName = App.Path & "\claim2.rpt"
'set the database password so crystal reports can access the data.
cr1.Connect = gs_dbPassword
'set the location of the data for the main report.
cr1.DataFiles(0) = gs_DataFile
'set the location of the data for the sub-reports.
cr1.SubreportToChange = "diags"
cr1.DataFiles(0) = gs_DataFile
cr1.SubreportToChange = "Procs"
cr1.DataFiles(0) = gs_DataFile
' cr1.SubreportToChange = "CCIs"
' cr1.DataFiles(0) = gs_DataFile
'now tell crystal we're dealing with the main report again.
cr1.SubreportToChange = ""
'and set the record selection crietera.
cr1.SelectionFormula = "{pClaim.uid} = '" & mUID & "'"
'set the window caption so our claim number is displayed.
cr1.WindowTitle = "Print Claim: " & mProvname & " - " & Trim$(txtClaimNbr)
'now run the report and then turn the hourglass off.
'cr1.Action = 1
cr1.Action = 1
I get the error when I set the Action parameter to 1.