Crystal Reports Logon failed

Discussion in 'ASP .Net' started by kimberly.walker@consultant.com, Jul 31, 2006.

  1. Guest

    Im creating a report in the .net 2003 and using sql server 2000 Ive
    checked all the help topics and even the support in microsoft my
    problem is I still keep getting the error Logon failed when i try to
    run a report. Below is my code: Any help will be greatly
    apprecated...

    ConnectionInfo cnn = new ConnectionInfo();
    TableLogOnInfo crTableInfo = new TableLogOnInfo();
    CrystalReport1 crp = new CrystalReport1();

    foreach(CrystalDecisions.CrystalReports.Engine.Table crtable in
    crp.Database.Tables)
    {
    crTableInfo = crtable.LogOnInfo;
    if (crtable.Name == "tblTroubleTickets")
    { crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
    crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
    crTableInfo.ConnectionInfo.UserID = "walk";
    crTableInfo.ConnectionInfo.Password = "98HElp!";
    }
    else
    {
    crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
    crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
    crTableInfo.ConnectionInfo.UserID = "walk";
    crTableInfo.ConnectionInfo.Password = "98HElp!";
    }
    crtable.ApplyLogOnInfo(crTableInfo);
    if(!crtable.TestConnectivity())
    Console.WriteLine(crtable.Name);
    }
    CrystalReportViewer1.ReportSource = crp;
    , Jul 31, 2006
    #1
    1. Advertising

  2. I haven't used Crystal in a long time and have no plans on using it in the
    future but have some vague memories that the server field is really the dsn
    name for an ODBC entry. Not well documented and poorly implimented.


    <> wrote in message
    news:...
    > Im creating a report in the .net 2003 and using sql server 2000 Ive
    > checked all the help topics and even the support in microsoft my
    > problem is I still keep getting the error Logon failed when i try to
    > run a report. Below is my code: Any help will be greatly
    > apprecated...
    >
    > ConnectionInfo cnn = new ConnectionInfo();
    > TableLogOnInfo crTableInfo = new TableLogOnInfo();
    > CrystalReport1 crp = new CrystalReport1();
    >
    > foreach(CrystalDecisions.CrystalReports.Engine.Table crtable in
    > crp.Database.Tables)
    > {
    > crTableInfo = crtable.LogOnInfo;
    > if (crtable.Name == "tblTroubleTickets")
    > { crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
    > crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
    > crTableInfo.ConnectionInfo.UserID = "walk";
    > crTableInfo.ConnectionInfo.Password = "98HElp!";
    > }
    > else
    > {
    > crTableInfo.ConnectionInfo.ServerName = "FSQLNV";
    > crTableInfo.ConnectionInfo.DatabaseName = "JEHelp";
    > crTableInfo.ConnectionInfo.UserID = "walk";
    > crTableInfo.ConnectionInfo.Password = "98HElp!";
    > }
    > crtable.ApplyLogOnInfo(crTableInfo);
    > if(!crtable.TestConnectivity())
    > Console.WriteLine(crtable.Name);
    > }
    > CrystalReportViewer1.ReportSource = crp;
    >
    Andrew Robinson, Jul 31, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Carlo Marchesoni

    Logon failed with Crystal Reports

    Carlo Marchesoni, Aug 20, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    777
  2. igitur
    Replies:
    3
    Views:
    9,678
    sprit01
    Apr 2, 2007
  3. GFro
    Replies:
    2
    Views:
    3,783
    Gregg Froelich
    Jul 23, 2004
  4. Milan Todorovic

    Crystal Reports 'Logon failed' problem

    Milan Todorovic, Feb 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    11,108
    =?Utf-8?B?Q2hyaXM=?=
    Mar 18, 2005
  5. John Dalberg
    Replies:
    1
    Views:
    564
    John Dalberg
    Feb 10, 2005
Loading...

Share This Page