473,549 Members | 2,346 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Crystal Reports + Logon Failed

Hi All

Am having major problem with crystal reports...Have
designed my report no problem, its when I try to run and
display ther report that I am getting a "Login Failed"
message. At first I thought it might have to do with the
regristration key, but that ok, when I right click on
Servers in the server explorer and then expand the
Crystal Server, there is a red x beside the Crystal
Enterprise. When I click on log in, I am asked for a
username and a password. I don't know what to put into
these fields, can anyone suggest a solution.

Michael

Nov 22 '05 #1
1 1793
Apply the following function to your report.
Note: If you report contains subreports, you must apply the function
to the subreports as well. The following function is for CR version 10
-------------------------------------------------
Private Shared Function SetUserAndPassw ord(ByRef rp As
CrystalDecision s.CrystalReport s.Engine.Report Document, _
ByVal ServerName As String, ByVal UserId As String, _
ByVal Password As String, ByVal DatabaseName As String) As
Boolean

Dim li As CrystalDecision s.Shared.TableL ogOnInfo, i As Integer
Dim ci As CrystalDecision s.Shared.Connec tionInfo
Dim ReturnCode As Boolean = True

Try
With rp
For i = 0 To .Database.Table s.Count - 1
li = .Database.Table s(i).LogOnInfo
ci = li.ConnectionIn fo

ci.ServerName = ServerName
ci.Password = Password
ci.UserID = UserId
ci.DatabaseName = DatabaseName

.Database.Table s(i).ApplyLogOn Info(li)
Next i
End With

Catch erreur As Exception
' DO something with the error
ReturnCode = False

End Try

Return ReturnCode
End Function
--------------------------------------------------------

"Michael O'Donnell" wrote:
Hi All

Am having major problem with crystal reports...Have
designed my report no problem, its when I try to run and
display ther report that I am getting a "Login Failed"
message. At first I thought it might have to do with the
regristration key, but that ok, when I right click on
Servers in the server explorer and then expand the
Crystal Server, there is a red x beside the Crystal
Enterprise. When I click on log in, I am asked for a
username and a password. I don't know what to put into
these fields, can anyone suggest a solution.

Michael

Nov 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2207
by: Bonj | last post by:
Hi I am trying to create a simple 'hello world' type web application involving a crystal report. I have basically done it the simplest possible way as described in the documentation, by adding a crystal report, choosing the data source for it*, and selecting columns. I then added a CrystalReportViewer from the 'Web forms' tab to the...
0
8718
by: stephan | last post by:
I know that this has been beaten to death but I can't seem to resolve my issues (I have 2 of them). I have created a class that exposes a public method which returns a datatable as a datasource for a Crystal Report. The method has a single argument which represents a parameter required by the Stored Procedure. When I generate the report...
2
3876
by: Karun Karunakaran | last post by:
Hi, I am using the Crystal Enterprise .NET assemblies to generate and display a crystal report in a webform. This report connects to an SQL server (running locally) using a specific username and password. I use the InfoStore object to query for the report from the CE server (also running locally) and bind it to the CrystalReportViewer...
2
2537
by: GFro | last post by:
I am getting the following error since we upgraded from .NET Framework 1.0 to 1.1. The reports all ran fine yesterday. I get this error in all apps with reports. The apps run fine but the reports give me the login error. Any ideas?
1
2022
by: andy lim | last post by:
Hello all, I'm developing a web application using ASP.NET/VB. I have problem in viewing my CR reports. It returns following exception when I tried to view any CR report. CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed I found many similar problem in several .NET forums, and no working solution.
3
15024
by: Milan Todorovic | last post by:
Hello, I need help. I have experience in ASP.NET programming, but this is my first dealing with Crystal Reports. I'm trying to make the most basic report purely for testing purposes: connect to the remote SQL DB and create a report on one of the tables. Every time I do it, I get the Logon Failed error...
1
2259
by: John Dalberg | last post by:
Running Crystal Reports with the hotfixes and patches & VS 2003. I created a CR report on my development server which has SQL Server. The report runs fine inside Visual Studio. When I switched the source of the DB to the production server using the 'set location' option in CR and ran the app again, I get "Logon Failed" error message. The...
9
6868
by: mollyf | last post by:
I have tried various suggestions that I have found searching the newsgroups and still haven't been able to figure why I keep getting the logon failed error. I created a report in Crystal (not via VS 2003). The data source to the report is a stored procedure (SQL S2K) that has no parameters. I'm also using SQL Server authentication to log...
3
2856
by: Shawn H. Mesiatowsky | last post by:
I have come across lots of information regarding this, but nothing seems to work. I have created a Crystal Report that access's a SQL server backend for the data, and I want to display the report via a webform and the CrystalViewer Web Component. First of all, I have been using Trusted Connections so far (for data access) and really do not...
19
4360
by: Michael O'Donnell | last post by:
Hi All Am having major problem with crystal reports...Have designed my report no problem, its when I try to run and display ther report that I am getting a "Login Failed" message. At first I thought it might have to do with the regristration key, but that ok, when I right click on Servers in the server explorer and then expand the...
0
7546
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7471
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7740
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7830
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5387
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5111
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1082
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
784
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.