Logon failed with Crystal Reports

  • Thread starter Thread starter Carlo Marchesoni
  • Start date Start date
C

Carlo Marchesoni

I have a Crystal Report that accesses one table in a very
simple Access Database (no user no password).
When Exporting the report to PDF format, the browser
gives the following error:
Logon failed.
Description: An unhandled exception occurred during the
execution of the current web request. Please review the
stack trace for more information about the error and
where it originated in the code.

Exception Details:
CrystalDecisions.CrystalReports.Engine.LogOnException:
Logon failed.

Source Error:


Line 57: base.OnInit(e);
Line 58: // Export
Line 59: reportDocument1.Export();
Line 60: // Build, View and Clear
temporary file
Line 61: Response.ClearContent();

did anyone experience this problem and how could I solve
it ?
Thanks
 
Did you set a ConnectionInfo object for the report document? For an Access
database, you need sepcify the username as "admin" and password as blank
string. Form more information about ConnectionInfo, you may refer to:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/crystlrf/ht
ml/crlrfconnectioninfoclasstopic.asp


Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."
 
Hi Carlo,

There is no syntac error in your code. If you still get the "Logon failed"
error", you may check the Windows account used by your program, to see if
it has enough permission to read the database and write the PDF file.

Additionally, ServerName (specified with DSN anme) may only contains the
server inforamtion, not with database name. And you need to set all tables'
logon inforation in the report.

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/security_bulletins/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."
 
Back
Top