This is a list of fixed issues in Service Pack 19 for Crystal Reports for Visual Studio (CRVS). Charts now have pixilated edges when using CR for VS Windows form. Logon failed with Crystal Reports. ASP.NET Forums on Bytes. Crystal Reports and Logon Failed. Visual Basic.NET Forums on Bytes.
Crystal Reports viewer reports, 'Failed to open the connection.' Read this document to find out how to address your connection issues! You try to open or refresh data on a report, and get a message box that says 'failed to open the connection.' Windows SysWOW64 odbcad32.exe; If using ODBC. Hi, logon failed message is really annoying. Im using push method. I created an xsd dataset file and change the datasource of the report at runtime with a populated dataset from the database. Im wondering why im getting this error, i already got the records in the runtime dataset, so crystal is not pulling data from the database but logon.
Active1 month ago
I am creating a simple report using a .NET object from my project as datasource, using
SetDatasource()
method. However, when I run the report I get 'Database logon failed' error. This report is not connecting to a DB at all - have I missed something here?Many thanks,D.
ADDED:I guess it will probably help if I include the Controller action. It's a quick and dirty test, not what the final method will look like:
FIXED:D'oh! I used ReportClass instead of ReportDocument. Changed that line, and also use Refresh() since Load() is not a valid method. Now it works just fine!
meJustAndrew3,34144 gold badges2727 silver badges5353 bronze badges
codedogcodedog1,36377 gold badges2929 silver badges6363 bronze badges
10 Answers
If you are using ADO.NET DataSets as your datasource, it is possible for the DataSet definition to get out of sync with the definition in the report. Selecting the Database->Verify Database option from the report designer's context menu will often fix this problem.
Also, you will get this error if your report has linked tables and you fail to set the datasource for one of the tables. The fix is either to remove the table from the report, or set it's datasource correctly.
For example, if your report has a Customers table and an Orders table linked together on some key you will need to set the datasource for both tables. If you forget and set only one, you will get a 'Database logon failure' error which is fairly misleading.
Timothy SchoonoverTimothy Schoonover
2,35511 gold badge2222 silver badges3939 bronze badges
Please try, Right-Click on Report -> Database-> Verify Database.
If dialog box appears, locate your DataSet .xsd file (e.g DataSet1.xsd) and Apply.
My problem solved in this way.
Htet ThuzarHtet Thuzar
I started getting this dialog popping up after I changed the name of the .NET object my reports were referring to. To get rid the dialog, I had to ensure that none of my report sections or fields referred to the old name of the .Net object which was easy to spot. The fix for me was using the rename function in the Database Expert for the report.
Crystal Reports Database Logon Failed
PPowerPPower
Fixed by using the appropriate class: ReportDocument instead of ReportClass.
codedogcodedog
1,36377 gold badges2929 silver badges6363 bronze badges
I was struggling with this error for a couple of days. I have a .NET webforms project which uses CrystalReportViewer to load a Crystal Report. Instead of the report loading, I kept getting 'Database logon failed'.
I opened the RPT file in Crystal Report Designer and went to
Database -> Verify Database
This gave me a more specific error. FINALLY!!!
I tracked down the XSD file, moved it to the right location and BOOM
CrazyPasteCrazyPaste
In my case i forget to set datasource to a datatable.something like this
rpt.Database.Tables('Account').SetDataSource(CType(DataSource.Account, DataTable))
Alessandro BernardiAlessandro Bernardi
Delmirio SeguraDelmirio Segura1,45711 gold badge66 silver badges44 bronze badges
I had to do write the below line of code to get rid of the 'Database login error'
About mobile9 Download free apps, games, themes, wallpapers, ringtones, and more for phones and tablets. Millions of members are sharing the fun and billions of free downloads served. Angry birds download mobile9.
Sunil JohnsonSunil Johnson
I started getting the notorious 'database logon failed' error on a Windows Server 2016 machine after the July 2018 windows server updates. The report ran fine in Visual Studio 2017 on my dev machine, but not in IIS on Windows Server 2016 in production.
After a day of investigation, I installed the Microsoft OLE DB Driver for SQL Server on my development machine - https://docs.microsoft.com/en-us/sql/connect/oledb/oledb-driver-for-sql-server?view=sql-server-2017. I created a report connection in the Crystal report database expert using the MSOLEDBSQL provider. I had to install the Microsoft OLE DB Driver for SQL Server on the production Windows Server 2016 machine as well.
It turns out Microsoft has decided to deprecate the Microsoft OLE DB Provider for SQL Server. This and the native client no longer seem to work with Crystal Reports.
Mike MooreMike Moore
Mine did it when I was sending in a DataSet instead of a DataTable.
ReportDocument.SetDataSource(dataset.Tables[0]);
Justin NimmoJustin Nimmo