[Last Call] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1316
  • Last Modified:

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.Business_Owner_ID};1;True"
            .Destination = crptToFile
            .PrintFileType = crptRTF
           ' .PrintFileName = strReportPath & MonthName(Now()) & " " & strBranchName & "Supervisor Report.rtf"
            .Connect = "ODBC;DSN=Advisory;UID=admin"
            .Action = 1
        End With
1 Solution
look at this article. It explains how to use connect
msanzenbAuthor Commented:
I figured out the problem.  I used another Crystal control and it worked.  Thanks for your help.

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now