msanzenb
asked on
Crystal Report Run Error
Below is a portion of my code that is supposed to generate an rtf report from Crystal. I am getting the following error when the code gets to the ".Action = 1" line: "method action of object crystalctrl failed." I have gone into the report and verified the database...it told me that the database was up-to-date. Do you know what else could be causing this problem?
Set crySupRept = New CrystalReport
With crySupRept
.DiscardSavedData = True
.ReportFileName = strReportPath & strReportName
.ParameterFields(0) = "{RA_Report_AccountSummary _TL.Branch _ID};" & strBranchID & ";True"
.ParameterFields(1) = "{RA_Report_AccountSummary _TL.Busine ss_Owner_I D};1;True"
.Destination = crptToFile
.PrintFileType = crptRTF
' .PrintFileName = strReportPath & MonthName(Now()) & " " & strBranchName & "Supervisor Report.rtf"
.Connect = "ODBC;DSN=Advisory;UID=adm in"
.Action = 1
End With
Set crySupRept = New CrystalReport
With crySupRept
.DiscardSavedData = True
.ReportFileName = strReportPath & strReportName
.ParameterFields(0) = "{RA_Report_AccountSummary
.ParameterFields(1) = "{RA_Report_AccountSummary
.Destination = crptToFile
.PrintFileType = crptRTF
' .PrintFileName = strReportPath & MonthName(Now()) & " " & strBranchName & "Supervisor Report.rtf"
.Connect = "ODBC;DSN=Advisory;UID=adm
.Action = 1
End With
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER