Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crystal Report: Unable to connect incorrect log on parameters

When printing a report, the user sometime have the following error:

CrystalDecisions.CrystalReports.Engine.LogOnException:  
Error in File C:\DOCUME~1\carolec\LOCALS~1\Temp\temp_b117cc2e-c184-4556-a493-e04e6d4126fb {388C2B55-114E-4087-A22D-9289902AFDEB}.rpt:  
Unable to connect: incorrect log on parameters. ---> System.Runtime.InteropServices.COMException (0x8004100F): 
Error in File C:\DOCUME~1\carolec\LOCALS~1\Temp\temp_b117cc2e-c184-4556-a493-e04e6d4126fb {388C2B55-114E-4087-A22D-9289902AFDEB}.rpt:
Unable to connect: incorrect log on parameters.
   à CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.GetLastPageNumber(RequestContext pRequestContext)
   à CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
   --- Fin de la trace de la pile d'exception interne ---
   à CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
   à CrystalDecisions.ReportSource.EromReportSourceBase.GetLastPageNumber(ReportPageRequestContext reqContext)
   à CrystalDecisions.CrystalReports.Engine.FormatEngine.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
   à CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)

Any ideas on a solution?

Configuration: C# (2008), WinForm, Crystal Report 10, SQL Server 2008 Express (local)

like image 494
izokurew Avatar asked Jul 06 '09 14:07

izokurew


2 Answers

For anyone having the same problem, also check if your report's Datasource provider is "SQL Native Client". If yes, this wont work in your Production server which doesn't have SQL client installed. It has to be "SQLOLEDB" for it work in machines where there is no SQL client installed.

This was the reason why my report worked on my test server(which had SQL server client) and did not work in my production server

like image 177
Arshad Mohammad Avatar answered Sep 20 '22 15:09

Arshad Mohammad


I have same problem but has solved.

The problem is in odbc connection. Just install SQL native driver to add connection in odbc. Download link https://support.fotoware.com/hc/en-us/articles/208664385-Microsoft-SQL-Native-Client-fails-to-download-during-FotoWeb-setup

like image 24
khamami Avatar answered Sep 20 '22 15:09

khamami