CRexport.exe on 64 bit system. Faile to log on to

2019-09-13 06:47发布

Using CRexport.exe on a 64 bit system gives an error.

  • .Net is 64 bit
  • CR Runtime is 64 bit

The report does run on Crystal Reports XI Release 2 when oppened.

Sample Command:

C:\crexport\crexport.exe -F C:\rpt\CheckLogin\LoginCheck.rpt -E "csv" -a "Token:636300135206847568" -O C:\crexport\CR_LOGIN.tkn -U [username] -P [pasword]

  • This report uses a PeopleSoft Query as a data source.
  • Command to execute a reort runs fine on my 32 bit machine.
  • Full source code being used to troubleshoot issue is on Github.
  • Same command returns error when ran on 64 bit machine:

Error: Failed to logon to Database. Check username, pasword, server name and database name parameter

Has anyone had issues with database authentication when using crexport.exe crystal reports runtime on a C# app?

I have not had any issues, untill we had a station replaced but with a Windows 7 64 bit system.

Update

I have tested another report that uses a command instead of a PeopleSoft Query as the data source (using trusted connections) and it works just fine.

I suspect that the password is not being set, despite the fact it is being provided. I added crexport.cs#L275-L351 to ensure the password and all connection information is set, but the errorm message Log on failed keeps happening.

Update 2

I have tried with the CristalReport Runtime 64bit v13.0.1, v13.0.13 and v13.0.20

Same error persists.

Update 3

Full source code of Crystal-Reports-Exporter I am using to troubleshoot this issue is found on github, branch issue-logonToDatabase.

Update 4

After a few days of troubleshooting, I believe I have found the problem.

It is related to the PeopleSoft PeopleTools (PeopleSoft) DSN driver. It is 32 bit, and apperently it does not get along well with the Crystal Reports Runtime 64 bit.

More on the answer below.

1条回答
贼婆χ
2楼-- · 2019-09-13 07:25

To be able to connect to PeopleSoft (and use the Queries from Query Manager) you must use the the 32bit version of the Crystal Reports Runtime for Visual Studio, because the PeopleSoft Driver is 32 bit.

This means that you must:

  • Install .NET Framework 32bit (Offline installer provides the 64 and 32 bit version)
  • Install Cristal Report Runtime for Visual Studio ( I was successfull using v13.0.13).
    • Higher versionf would create errors on my report formulas.
  • Compile your tool/program that will be running the Crystal Reports with a Target Framework: .NET Framework 4+ and Plataform target: x86
    • Plaform Target: Any CPU + Prefer 32-bit may work but I have not tested it

Notes

I saw issues when I would chain start my tool/program from a 64bit program.

It would not constrain my tool/program to 32 bit libraries and it would try to load the 64bit version of Cristal Reports Runtime.

However, 32bit version of PeopleSoft Driver does not play nice with 64bit version of Cristal Reports Runtime.

查看更多
登录 后发表回答