Crystal & ADO.NET Bug?

From: ksedran (ksedran_at_discussions.microsoft.com)
Date: 11/30/04


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


Relevant Pages

  • SQL Connection Problem?
    ... I'm working with CrystalReports.NET to create a report for my VB.NET Windows ... and I'm having trouble with the connection to my SQL ... When I try to run the report, I can't get rid of the login ... displays/processes data from the database. ...
    (microsoft.public.vb.crystal)
  • Re: Where am I? :)
    ... Some programs may tweak wtmp to `hide' users that are actively logged ... What a bug about this would report is that set-user-id programs, ... Can't screen and login be modified somehow to take care of this issue? ...
    (freebsd-questions)
  • Re: fbreseal corrupts user permissions
    ... If you can easy report the issue I'd suggest you to file a bug to Microsoft: ... (there was some problems reported about fbreseal and NTFS) ... Basically you'd want to check if SID list there include the ... login as "support", i could not set the folder options settings, ...
    (microsoft.public.windowsxp.embedded)
  • How to login Report Builder 9.0 in Windows Command Prompt?
    ... Just wonder how to login the Oracle Report Builder 9.0 in Windows XP ... I used the same user name, password, n Databaseor ODBC in Report ... But when i used the in command prompt to call the report out like ...
    (comp.databases.oracle.tools)
  • Re: Disconnected Dataset w/ Crystal Reports
    ... You surely have created you report by binding it on a database. ... I.e., it is a DataSet derived object, and I have all the data I need. ... it prompts me for login credentials: ...
    (microsoft.public.vb.crystal)