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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need data from a second server?

Status
Not open for further replies.

jameslx

Programmer
Oct 18, 2001
21
US
I have a Crystalreport residing on server_1 and ParamTables on the same server. A DTS package (VBScript) gathers the Parameters and calls the CrystalReport and places the parameters into Crystal. Then CrystalReport.Export False statement is executed and the report runs a StoredProc on server_1 for the data and when complete places the report into a directory on the same server. This all works fine until CrystalReports needs to use a stored proc on another server Server_2 at which point the .export False statement fails to run Crystal. I am not sure how to correct this. The DTS package need to run for data from either server. Any ideas?
 
James,

I hoping we can help eachother. If your app/report needs to call multiple stored procedures on different servers, than I would imbed the calls withing the procedure that you initially execute. If you absolutely need to connect to another SQL Server to execute the other procedure, perhaps you need to Set your objects to NOTHING and respecify the login info i.e.

Dim craRpt ' is a CRAXDRT.Report object
Dim craApp ' is a New CRAXDRT.Application
set crClass = new CRAXDRT.Application
Set craRpt = craApp.OpenReport(DTSGlobalVariables("pvReport").Value)
craRpt.Database.Tables(1).SetLogOnInfo DTSGlobalVariables("DBA_Source").Value, _
DTSGlobalVariables("DBA_InitialCatalog").Value, _
DTSGlobalVariables("DBA_Username").Value, _
DTSGlobalVariables("DBA_Password").Value


Now can you help me?

In my code that I've included above, DTS complains that the CRAXDRT class is not defined. For some reason, you can't do a CreateObject on this. Can you send me a sample of your code at DFleischman@Highlights-corp.com?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top