Exception Details:CrystalDecisions.CrystalReports.Engine.LogonException: Logon Failed.

Posted on 2006-03-30
Last Modified: 2012-08-13

I am trying to run a Crystal report in .NET and there are several Crystal reports which are working just fine and even this one does in the development environment but it does not work in the testing environment.
Follwing is the error:::
Logon Failed
Exception Details:CrystalDecisions.CrystalReports.Engine.LogonException: Logon Failed.
Any help would be greatly appreciated!!!
Question by:parveenmehta
    LVL 3

    Accepted Solution

    You need to set the database user's login and password before setting the ReportSource

    ' Set the database login to avoid "Login Failed" errors
                cryReport.SetDatabaseLogon("user", "pass")

    I had the same issue, this was the only sure-fire way of making sure it works across development, staging and production servers.

    Author Comment

    Thanks for the quick reponse.
    I have about 8 other reports which are working just fine and i actually have views created in Oracle which server to populate reports.
    Now this is the only one which does not work even though it uses the same log in info as other reports do.
    This report works just fine in development environment.
    LVL 25

    Assisted Solution

    If it is possible, try recreating the report. Crystal reports sometimes can get messed up and store hard-coded connection information in itself. Otherwise, try the solution recommended by SuperGhosty :)

    LVL 3

    Expert Comment

    nauman is correct, there seems to be a bug with crystal reports.

    I have been able to remove the connection information completely from the report and then recreate it and my report started working again. However it happened again so I hard-coded it programatically.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now