Link to home
Start Free TrialLog in
Avatar of tambrosi
tambrosi

asked on

ActiveX Component can't create object ("crystal.crpe.application")

Trying to run a Crystal report from VB script.  

SET oCRApp = Createobject("crystal.crpe.application")
SET oReport = oCRApp.OpenReport("C:\MyPath\MyReport.rpt")
oReport.PrintOut()

Get the error, ActiveX Component can't create object ("crystal.crpe.application")
code 800A01AD
MicroSoft VBScript runtime error

I been digging for a while on this, and not really sure what is making this error.

I am running from my PC where I have SAP Crystal Reports 2013 installed.  I installed the runtime also. I can bring Crystal up
and create/run a report.  

Would anybody have any ideas on this and why it is failing.
Thanks
Avatar of vasto
vasto
Flag of United States of America image

I never used this way to run a report, I am not even sure if the license allows it , but check if the name "crystal.crpe.application" is correct,
Avatar of Arana (G.P.)
Arana (G.P.)

Sometimes the problem with crystal reports is that it is taking the wrong library for the purpose, for example you might have tried to use the SDK libraries for distribution version the license does not allow that, also make sure your version allows to run reports this way, I havent used Crystal Reports in a while but i remember only their developer version had the libraries needed for distribution.
 
If it is a 64bits windows version then maybe script is looking for the file in the wrong place (system32 or syswow64)
SOLUTION
Avatar of Mike McCracken
Mike McCracken

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
ASKER CERTIFIED SOLUTION
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 tambrosi

ASKER

Thanks for the info.  I was afraid that was going to be the answer after my testing and digging thru posts out on the web.