Link to home
Start Free TrialLog in
Avatar of sandy1234
sandy1234

asked on

Crystal report accessing using VB

I am developing a web based application using VB6(activeX control and RDO connections), MS-SQL. I am using crystal report8.0 for generating the report. The following code is used for accessing the report...

dim RS as new recordset
dim crappl as new craxdrt.application
dim crrep as new craxdrt.report

'' to get the data from database
S="select eno,ename from edata"
set RS = con.openresultset(S,rdopendynamic,rdconcurrowver)

set crrep = crappl.openreport("\\ path to report")
crrep.database.setdatasource RS
crviewer1.reportsource=crrep
crviewer1.viewreport

I am making .ocx for the project and registering it and saving each usercontrol as .htm and storing it on server.

Now the problem is when after registering i run the .htm all is fine for my computer. But when i am trying to run them on other networked comps. the data is being saved in server but when trying to open the crviwer to print the data following error occurs.

Error 429:ActiveX component can't create object.

this error is not coming on my comp. only on the networked comps.
 
Thanks in advance
Avatar of geestarz
geestarz

Hi!
I've the same problem...on my machine where CR (9.0) is installed it works fine but on all other client machines I get the same error message... Hoping for a solution, too.
Do you have both craxdrt.dll and crviewer.dll installed on the client machines?

One of these (craxdrt iirc) needs to be registered with regsvr32

Dan
Both files are copied to the system directory, but the craxdr.dll cannot be registered. After typing regsvr32 "c:\win\system\craxdrt.dll" the regsvr32 doesn't react...so I'm not able to register this file...
craxdrt.dll should register.  I have v8.0.0.371 here and it registers fine.

Do you have MFC42.dll and MSVCRT.dll on the clients?
Are you developing on the same OS as the clients?

We developed on XP and distributing to 9x boxes was a nightmare!
There's no difference between running the software on XP, 2000 or 9X / ME...it doesn't work...only if I install CR on the client machine  the .dll files are registered correctly and the software can be run...
ASKER CERTIFIED SOLUTION
Avatar of StarglazeIT
StarglazeIT

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 sandy1234

ASKER

They only run on my computer where i have developed the application. Crviwer is not working on any computer whether CR installed or not. I have registered craxdrt.dll and crviewer.dll on client. I have MFC42.dll an dMSVCRT.dll also on the client.
 Do i have to do package and deploy the application or only registering the .ocx file and saving the usercontrol as .htm will work.
  Thank you.
Register all the key dll's in my above post and it will work!
Starglaze - that is for crystal reports 9.  Sandy has CR8.

Dan
doh!

You should be able to find a dependency list for CR8 on crystal's website
Hi StarglazeIT!
Thanks for your excellent hint...now it works!! The Crystal Report Viewer opens on the client. But now I've got another problem:
I can't logon to db for creating the reports. Crystal Report Viewer says: "Logon failed. Error Code: 0x8007007e"
The settings and filepaths are correct. If I run it on the developing machine
"MsgBox Report.Database.Tables(n).TestConnectivity" says "True" but on the client it returns "False".
I checked
Report.Database.Tables(1).ConnectionProperties("Database Name")
Report.Database.Tables(1).ConnectionProperties("Database Type")
Report.Database.Tables(1).ConnectionProperties("Session UserID")
Report.Database.Tables(1).ConnectionProperties("Session Password")
Report.Database.Tables(1).ConnectionProperties("System Database Path")
step by step and they are all correct...but why now this error occures?? Please help me. Is there something else to do when you're trying to open a password-protected access-database (with db.mdw) ??
If you want fix this problem doing this

regsvr32 "C:\Program Files\Common Files\Crystal Decisions\2.0\bin\keycode.dll"
regsvr32 "C:\Program Files\Common Files\Crystal Decisions\2.0\bin\CRAXDRT9.DLL"
regsvr32 "C:\Program Files\Common Files\Crystal Decisions\2.0\bin\crviewer9.dll"
regsvr32 "C:\Program Files\Common Files\Crystal Decisions\2.0\bin\CRQE.DLL"
regsvr32 "C:\Program Files\Common Files\Crystal Decisions\2.0\bin\EXPORTMODELLER.DLL"
regsvr32 "C:\Program Files\Common Files\Crystal Decisions\2.0\bin\CRTSLV.DLL"


in the same order
Luis Villarino
http://www.lasvegaswh.com