Crystal & ADO.NET Bug?
From: ksedran (ksedran_at_discussions.microsoft.com)
Date: 11/30/04
- Next message: Mike Gorgone: "Re: Crystal Preview (.show) is very slow"
- Previous message: LouV: "Crystal not closing sql database connections"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 30 Nov 2004 14:15:10 -0800
Hi all,
I am having login credential problems with Crystal Reports on a windows form
using VB.NET.
I am using the following code to load the report, provide login credentials,
and view the report.
'CR Variables
Dim crTables As Tables
Dim tbCurrent As Table
Dim crReportDocument As ReportDocument
Dim logOnInfo As New TableLogOnInfo
Dim connectionInfo As New ConnectionInfo
Dim i As Integer
crReportDocument = New ReportDocument
crReportDocument.Load("" & AppPath & "\Reports\" &
passed_reportname & ".rpt")
For i = 0 To crReportDocument.Database.Tables.Count - 1
logOnInfo = crReportDocument.Database.Tables.Item(i).LogOnInfo
connectionInfo =
crReportDocument.Database.Tables.Item(i).LogOnInfo.ConnectionInfo
logOnInfo.ConnectionInfo.ServerName = "" & DataBase & ""
logOnInfo.ConnectionInfo.UserID = "" & username & ""
logOnInfo.ConnectionInfo.Password = "" & userpassword & ""
crReportDocument.Database.Tables.Item(i).ApplyLogOnInfo(logOnInfo)
Next i
'Set the viewer to the report object to be previewed.
CrystalReportViewer1.ReportSource = crReportDocument
Now If I create the report using ODBC instead of ADO then this works
perfectly.
When I use ADO as the connection type to create the report I get a login
problem. When the reportviewer is launched a login box pops up asking for
credentials (No login pops up when using ODBC). The username and password are
filled in as should be, but the servername is blank and disabled, so I can't
put anything in the servername box even if I wanted to. Of course the login
fails, when Finished is clicked.
Anyone having or seen similar issues????
Thanks,
-- Kevin
- Next message: Mike Gorgone: "Re: Crystal Preview (.show) is very slow"
- Previous message: LouV: "Crystal not closing sql database connections"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|