title: asp.net Crystal Reports, Database Logon Failed
body: <p>I can't get this report exported as a pdf. I've done this many times before, but now I hit a brick wall. any help would be appreciated.</p>
  
  <p>This is on a windows 7 64 bit machine.</p>
  
  <p>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. </p>
  
  <pre><code>Exception Details: System.Runtime.InteropServices.COMException: Database logon failed.
  
  Source Error: 
  
  
  
  Line 25:         exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat
  Line 26:         exportOpts.ExportFormatOptions = pdfOpts
  Line 27:         report.ExportToHttpResponse(exportOpts, Response, False, "")
  Line 28: 
  Line 29:     End Sub
  
  Stack Trace: 
  
  
  
  [COMException (0x8004100f): Database logon failed.]
     CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext) +0
     CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +519
  
  [LogOnException: Database logon failed.]
     CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e) +1243
     CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext) +621
     CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext) +1201
     CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options) +150
     CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName) +212
     reports_CreateReport.generateReport(DataSet ds, String reportpath, ArrayList params) in C:\Users\boruch\Dropbox\Korns-ConnectionStr\reports\CreateReport.aspx.vb:27
     reports_CreateReport.btn_GenReport_Click(Object sender, EventArgs e) in C:\Users\boruch\Dropbox\Korns-ConnectionStr\reports\CreateReport.aspx.vb:58
     System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9552602
     System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
     System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
     System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
     System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
     System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
  
  
  
  
  --------------------------------------------------------------------------------
  Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18044 
  </code></pre>