Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set Server Location - CRAXDRT.dll VB6 CR8.5

Status
Not open for further replies.

traceytr

Programmer
Mar 13, 2001
94
0
0
US
Hi. (VB6, CR8.5)

I'm creating a program to loop a list of Crystal Reports through a Set Location procedure to change the server location, but I'm not off to a very good start. I've seen this done before and know only enough to be dangerous. I did add the reference Crystal Reports 8.5 ActiveX Designer Runtime Library, but I think I need to register a .dll to make this work. From what I've been reading in this forum I believe the name of it is CRAXDRT.dll. Can someone please tell me if I need to do this, and I really hate to ask this next question... Can someone please tell me HOW to register a .dll? Keep in mind I won't be viewing the report through this app, just change the server location only.

Here are a few lines of my code including the line where I get the error. The error message says "Runtime Error '429' ActiveX component can't create object." Thanks in advance for any comments.

Private Sub cmdSetLocation_Click()

'Crystal 8.5 start
Set CRReport = Nothing
Set CrxApp = Nothing
Set CRReport = New CRAXDRT.Report

'This is the line that gives me the error.
Set CrxApp = CreateObject("crystalruntime.application.9")

Set crxSubReport = Nothing
Set crxSubReport = New CRAXDRT.Report
Set CRXSubReport2 = Nothing
Set CRXSubReport2 = New CRAXDRT.Report

 

traceytr,

You say you added the ref. for CR 8.5
but the you show some code where you are doing late binding of CR 9?????
Not a big fan of late binding, always just add the reference.

if you do not have CR 9 delevoper installed you will get the 429 error.

next using the set location will on work if you are going to be processing the report in your app. Nothing is save to the rpt file.

I would try using at least CR9 engine to process the report and use the connection properties.

I hope I help just a little bit !
 
You have been very helpful. I've used this procedure, but at the time I was on a team of six developers working together on different pieces of the same apps. This procedure was already in a module and the .dll business was taken care of by another developer. We did migrate from Crystal 8 to 8.5 and then to 9. So, in a nutshell, I cannot use this to change the server location except when processing the report in the application. Is this correct?

Thanks for your help.


Tracey




 
Tracey

To may knowledge the set location is only used for processing reports at runtime. and does not make any perminate changes to the RPT file. I also don't know of any VB functions that make changes to the RPT. But I am NO professional at either VB or crystal.

We do use a 3rd party app to process alot of our Crystal Reports where you could schedule any given report to run against multi data sources. IE if you have a server in Denver and one in New York, you could schedule a single report to run first against the one server and the against the second server.

I don't know if that helps you or not??!?!


PS...the app is from scheduledreports.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top