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

Use Active connection for Crystal Report

Status
Not open for further replies.

rdeleon

IS-IT--Management
Jun 11, 2002
114
US
I have created a report (C8.5) that originally used a system DSN and a stored procedure. I am using the crystal viewer to display the report in my application (I inherited the application). My question is: how can I get the report to execute using the database that the application is pointed to and not the development database?

I have read through many of the previous posts and tried using several solutions offered (Logonserver, Database.Tables.Add, etc) but have not had success.

Per one of the postings, I changed the table location in the Crystal report by using the Database\Set Location option to remove all but the stored procedure name, but the "location" box still displays the development server, server name, and UserID. Did I do this correctly?

Anyway, here is a sample of the code that I am using. Any help is appreciated. I am using VB6 and SQL Server 2000.

Private Sub Form_Load()
Dim crApp As New CRAXDDRT.Application
Dim crRpt As New CRAXDDRT.Report

Set crRpt = crApp.OpenReport(App.path & "\PriorYearComparison1.rpt")

CRViewer1.ReportSource = crRpt
CRViewer1.ViewReport


End Sub

Thanks in advance.

Rene'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top