Data Connectivity
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Data Connectivity
Message Icon Topic: Can't connect to database Post Reply Post New Topic
Author Message
carlp22
Newbie
Newbie


Joined: 21 May 2007
Location: United States
Online Status: Offline
Posts: 5
Quote carlp22 Replybullet Topic: Can't connect to database
    Posted: 21 May 2007 at 1:54pm
 Hello All,

 With Visual Studio 2005, using VB, I have created a simple embeded Crystal report.  It only reads one Oracle table.

 I can't connect to the database! 

Here's the code I'm using.

Within a Windows form, I have a Crystal Reports Viewer (crvAllReports).  I'm  ODBC.

The form appears (no data of course), and after a couple of minutes, I get the error stating it can't connect to the database.
 
 What am I doing wrong?

 Thanks for the help,

Carl

 

 Dim crtableLogoninfos As New TableLogOnInfos()

Dim crtableLogoninfo As New TableLogOnInfo()

Dim crConnectionInfo As New ConnectionInfo()

Dim CrTables As Tables

Dim CrTable As Table

 

With crConnectionInfo

    .ServerName = "GoodName"

    .UserID = "Correct ID"

    .Password = "Correct Password"

End With

 

Dim sReport As New rptTest_2

CrTables = sReport.Database.Tables

 

'Loop through each table in the report and apply the

'LogonInfo information

For Each CrTable In CrTables

     crtableLogoninfo = CrTable.LogOnInfo

     crtableLogoninfo.ConnectionInfo = crConnectionInfo

     CrTable.ApplyLogOnInfo(crtableLogoninfo)

Next

 

crvAllReports.ReportSource = sReport

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.015 seconds.