Link to home
Start Free TrialLog in
Avatar of msanzenb
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.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
ASKER CERTIFIED SOLUTION
Avatar of ebolek
ebolek

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of msanzenb
msanzenb

ASKER

I figured out the problem.  I used another Crystal control and it worked.  Thanks for your help.