on 03-22-2013 9:02 PM
I have a problem with Crystal Reports for .NET in IIS 7.5 in Windows 7 64 Bits System Operational. When I change my Application Pool to Use 32 Bits its run.
CrystalDecisions.CrystalReports.Engine.LogOnException: Database Logon Failed. ---> System.Runtime.InteropServices.COMException: Database logon failed.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
--- End of inner exception stack trace ---
at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportOptions options, HttpResponse response, Boolean asAttachment, String attachmentName)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToHttpResponse(ExportFormatType formatType, HttpResponse response, Boolean asAttachment, String attachmentName)
Best regards,
Posted in incorrect forum
Moved to the SAP Crystal Reports, version for Visual Studio Space.
- Ludek
SCN Moderator
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jener
What version of CR are you using?
What CR Service Packs have been applied?
What version of .NET are you using?
What OS?
- Ludek
Follow us on Twitter
Got Enhancement ideas? Try the SAP Idea Place
Hello Ludek,
I'm using the following properties in the *.rpt file:
* Database Type: OLE DB (ADO)
* Provider: MSDAORA
* Use DSN Properties Default: False
* Locale Identifier: 1046
* OLE DB Services: -5
I've 32 Bits and 64 Bits Oracle Clients installed in the machine. Version 4.112.3.0.
I'd the following steps to try correct it:
* I'd run Oracle Universal Installer 32 Bits and I'd uninstall OLE DB Provider.
* I'd run Oracle Universal Installer 64 Bits and I'd uninstall OLE DB Provider
* I'd reboot the machine.
* I'd run Oracle Universal Installer 64 Bits and I installed OLE DB Provider again.
Unfortunately the same problem persists after this, the application runs in 32 Bits App Pool and not run in 64 Bits App Pool with Logon Failed.
Thanks,
Jener
Hello,
Microsoft only has limited support for the MDAC SQL drivers. Install the MS SQL Server 2008 client tools and then select the SQLNCLI10.dll, SQL Native 10 client when you use the Set Location in the Designer to update the reports for your connections.
You also need to install the 64 bit Client tools on your Web Server to be able to use 64 bit AppPool.
Then it should all work fine.
Don
Hi Jennifer.... Oops... lol long day yesterday...
Actually it is related though...
What I meant to say is why are you using the Microsoft Oracle driver if you have both Oracle clients installed?
MS's driver only supports up to Oracle 7. See this MS Kbase article for more info:
http://support.microsoft.com/kb/244661
Use Oracles OLE DB driver.
Thanks
Don
Hi Luduk,
I have a same problem : "Database logon failed"
Error occured when export to PDF file for report ..........: Database logon failed.
I am using Crystal Report 13 & vb.NET 2010 and I am using Microsoft ODBC for oracle - 32 bit Since we are using 32 bit application.
Can you give me the suggestion / solution how can i resolve this issue with ODBC -32 bit for 32 bit application.
By
YB
My codes are in below :
Dim crRpt As New ReportDocument()
Dim crExportOptions As New ExportOptions()
Dim crDiskFileDestinationOptions As New DiskFileDestinationOptions()
Dim crPDFRFTFormatTypeOptions As New PdfRtfWordFormatOptions
Dim crCsvFormatTypeOption As New CharacterSeparatedValuesFormatOptions
Dim crConnInfo As New CrystalDecisions.Shared.ConnectionInfo
Dim strRpt, strFile As Object
Dim strCurrValue As String
Dim strReportTitle As String
strReportTitle = ""
.......
strRpt = c:\sample 1 & ".rpt"
strFile = Filename
crRpt.Load(strRpt)
crExportOptions = crRpt.ExportOptions
crRpt.Refresh()
With crConnInfo
crConnInfo.ServerName = strServer
crConnInfo.UserID = strUser
crConnInfo.Password = strPWD
End With
..........
......
.......
With crExportOptions
Select Case UCase(Trim(format_Renamed))
Case "PDF"
.ExportDestinationType = ExportDestinationType.DiskFile
.ExportFormatType = ExportFormatType.PortableDocFormat
.DestinationOptions = crDiskFileDestinationOptions
.FormatOptions = crPDFRFTFormatTypeOptions
Case CStr("")
.......
End Select
End With
If bExport Then
crRpt.Export()
Write2Log(strFile & " was exported successfully")
ExportFile = True
Else
.......................
I see the problems
1. DO NOT call .refresh() until after you have set the database login and your export options.
2. Oracle works a bit differently from everything else. Instead of setting crConnInfo.ServerName = strServer, try crConnInfo.DatabaseName = strServer. Also, you're not calling ApplyLogonInfo() to apply the database logon. See http://scn.sap.com/docs/DOC-6941 for sample code on how to do this.
-Dell
User | Count |
---|---|
69 | |
8 | |
8 | |
6 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.