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

Exporting from Crystal

Status
Not open for further replies.

ihaveaproblem

Programmer
Jul 4, 2003
14
GB
When I try to export a Crystal Report Via VB6 i eventally receive a message which states "Cannot open SQl Server"

I have created a connection to SQL Server and the connection is open.

Do i need to explicity specify somwhere in the code a connection between Crystal reports and SQl server.

Any pointer would be appreciated
 
Some of my code . . .

Set CrxApp = New CRAXDRT.Application
Set CrxRpt = CrxApp.OpenReport(ReportName)

CrxRpt.RecordSelectionFormula = ""

CrxRpt.Database.Tables
(1).SetLogOnInfo "SERVER", "DataBase", "UserName",
"password"
CrxRpt.Database.Tables(1).Location = "Database.dbo." &
msTempTableName

'Set Crystal Viewer Control source

crvRPTView.ReportSource = CrxRpt

PS. Check the Access on the Table that you are using - if it is a temp table you might have to GRANT ACCESS first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top