Crystal Report Export - Database Logon Failed
Below is my code in VB.Net. I am using PUSH method to populate my data. I use Crystal Report and VS 2003. I am trying to export a crystal report to a PDF. I am getting a database log on error. Please help!!!
----------------------------------------------
Try
Dim oStream As New MemoryStream
Me.crpt_numIssues.ExportToStream(ExportFormatType.PortableDocFormat)
Response.Clear()
Response.Buffer = True
Response.ContentType = "application/pdf"
Response.BinaryWrite(oStream.ToArray())
Response.End()
Catch ex As Exception
Dim mgsText As String
mgsText = "ERROR: An error occured. <br>" + ex.ToString
Me.ShowErrorPanel(mgsText)
End Try
------------------------------
The error is:
CrystalDecisions.CrystalReports.Engine.LogOnException: Database
logon failed. ---> System.Runtime.InteropServices.COMException
(0x8004100F): Database logon failed. at
CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions
pExportOptions, RequestContext pRequestContext) at
CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext
reqContext)