Crystal Report Logon Failed Error In Vb.net
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Why do I get “Database logon failed” in Crystal Reports when using .NET object as datasource? up vote 5 down vote favorite 4 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: public ActionResult StewardSheets(int showId, int groupId) { ReportClass rptH = new ReportClass(); rptH.FileName = DataHelper.getReportFilePath("Test.rpt",this); NZDSDataContext dataContext = new NZDSDataContext(); var showDetails = (from s in dataContext.Shows where s.ID == showId select new StewardSheetModel { EventDate = s.EventDate.ToLongDateString(), Region = s.Region.Name, ShowTitle = s.Name }).FirstOrDefault(); List
Failed. If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 5 of 5 Thread: [RESOLVED] Crystal Report loading error Logon Failed. Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Feb 11th, 2014,07:41 PM #1 ADQUSIT View Profile View Forum Posts Thread Starter Fanatic Member Join Date Nov 2010 Posts 965 [RESOLVED] Crystal Report loading error Logon Failed. Hi. I developed the application and now http://stackoverflow.com/questions/4309533/why-do-i-get-database-logon-failed-in-crystal-reports-when-using-net-object-a when i run on any other computer except the developed one so all insertion is fine but when it comes to crystal report so it gives error that Login Failed. This is my code which produce the crystal report: Above this code there is a insert statement and then the code: Code: Try If chkReport.Checked = True Then retrieveOneRecord("SaleMaster", " SaleID = " & txtSaleID.Text) Dim objCr As New crSale objCr.SetDataSource(dsSql.Tables("SaleMaster")) frmSaleReport.crvSale.ReportSource = objCr frmSaleReport.Show() End If If http://www.vbforums.com/showthread.php?754059-RESOLVED-Crystal-Report-loading-error-Logon-Failed i run the same setup on developed machine so its working but not on any other computer. Please guide me for this. Why its failing. Jmcilhinney post for Retrieving and Saving Data in Databases Browse Button Problem with Link in my signature GOT & LOST FOCUS, ENTER & LEAVE EVENT How to alter my DB Tables and add the old data into new structure table Reply With Quote Feb 12th, 2014,01:00 PM #2 jggtz View Profile View Forum Posts Frenzied Member Join Date May 2006 Location some place in the cloud Posts 1,885 Re: Crystal Report loading error Logon Failed. You need to provide the connection information in the code using the ConnectionInfo property JG ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ... Reply With Quote Feb 12th, 2014,07:46 PM #3 ADQUSIT View Profile View Forum Posts Thread Starter Fanatic Member Join Date Nov 2010 Posts 965 Re: Crystal Report loading error Logon Failed. This is my connection string in module. Code: Dim strCn As String = "Data Source = (local); Initial Catalog = AbidMIS; User ID = sa; Password = 123456;" Jmcilhinney post for Retrieving and Saving Data in Databases Browse Button Problem with Link in my signature GOT & LOST FOCUS, ENTER & LEAVE EVENT How to alter my DB Tables and add the old data in
SQL Server 2014 Express resources Windows Server 2012 resources Programs MSDN subscriptions Overview Benefits Administrators Students Microsoft Imagine Microsoft Student Partners ISV Startups TechRewards Events Community Magazine Forums Blogs Channel 9 Documentation APIs https://social.msdn.microsoft.com/Forums/en-US/68876082-1f22-4bb8-9e2f-52c54c177367/logon-failed-problem-with-crystal-report-net?forum=vscrystalreports and reference Dev centers Retired content Samples We’re sorry. The content you requested has been removed. You’ll be auto redirected in 1 second. Ask a question Quick access Forums home http://crystalreporthosting.asphostcentral.com/post/Crystal-Report-Hosting-Solving-the-Login-Failed-Error-in-Crystal-Reports.aspx Browse forums users FAQ Search related threads Remove From My Forums Answered by: Logon Failed: Problem with Crystal Report (.net) Archived Forums C-D > Crystal Reports for Visual Studio (Retired) crystal report Question 0 Sign in to vote hi to alli m using crystal report in my windows .net application. its working nicely in my development PC.but on deploynment PC it shows following error message: Logon failed for user ''sa". Scnario is like this: Deployment PC and sql server are on different machine in LAN. Deployment PC does not contain Crystal Report. i crystal report logon m trying to connect to Report using xsd file(that is dataset) if any 1 knows the solution pls help me ASAP.My e-mail ID:sagar_grp@yahoo.com Thanks Saturday, December 03, 2005 4:36 PM Answers 0 Sign in to vote sagarsinhI went through the same thing about 6 months ago. Following is the VB.NET code I found that works. You should have no problem converting it to C#. 'Both of these CR assemblies are required to be able to'access, load, and set database logon.Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.Shared'CR VariablesDim crReportDocument As rptBillableHoursDim crDatabase As DatabaseDim crTables As TablesDim crTable As TableDim crTableLogOnInfo As TableLogOnInfoDim crConnectionInfo As ConnectionInfo
'' All code for connection is located in InitializeComponent()''--------------------------------------------------------------------------------'Create an instance of the strongly-typed report objectcrReportDocument = New rptBillableHours ' Report Name 'Setup the connection information structure to be used'to log onto the datasource for the report. crConnectionInfo = New ConnectionInfoWith crConnectionInfo .ServerName = "???"'physical server name .DatabaseName = "???"'name of database .UserID = "???"'UserID to use .Password = "???"'Password for UserIDEnd With 'Get the table information from the report crDatabase = crReportDocument.DatabasecrTables = crDatabase.Tables 'Loop through all tabApplications >> Crystal Report Hosting :: Solving the Login Failed Error in Crystal Reports March 14, 2011 17:48 by Administrator Introduction In his “Troubleshooting Database Login Errors using Crystal Reports with .NET,” Eric Landes points out that he sees questions regarding the “Exception Details: CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed” message quite often in the newsgroups. That's an understatement. Since I use the “push” method (generating an ADO.NET dataset first, then setting the report's DataSource), I never saw this error, but I decided to try and replicate the problem to see why this was happening--it seems to be a popular error. I had a suspicion that impersonation and the “double hop“ (where the ASP.NET application cannot pass the user's credentials) may play a role in this problem, since the methods in Eric's article don't solve the problem for every user it should. To replicate the problem, I used an ASP.NET project connecting to either a remote production SQL Server database or a copy of the same database on my development machine (SQL Server Developer Edition). I created a stored procedure that was just a simple SELECT statement, and used this stored procedure as my report source (“pull“ method). I probably created this report 20 different ways, testing various options, and here's what I found. Lesson 1: Integrated or SQL Server Security When you begin to design your report, you are prompted to connect to the SQL Server database when you choose an OLEDB connection (CR.NET doesn't use ADO.NET, and ODBC requires a system DSN). Your choices are to use Integrated Security or to enter a user ID and password. If you choose Integrated Security, Visual Studio will use your credentials to connect to the SQL Server database via Windows Authentication. If you choose to enter a user ID and password, VS will connect using SQL Server authentication. You cannot enter another domain account in the user ID and password boxes and connect using those credentials via Windows Authentication. This information in these textboxes can only be used for SQL Server authentication. Even though you must enter a password at this stage, the password information is not stored within the report file for security reasons. The password is only used to establish the da