rainforestnet / CrystalReportsNinja

A small Windows Console App that loads external Crystal Reports file, takes parameter inputs and export to various format or even print to printer
http://www.rainforestnet.com
93 stars 77 forks source link

Same Issue as previous post - The Type initializer for 'Crystal Decisions....' threw an exception #24

Open ljkern opened 6 years ago

ljkern commented 6 years ago

I am running on Windows 10 64 bit. I have to use a 32 bit ODBC connection because I am connecting my Crystal Report to a DBF file. I tried using the 64 bit Crystal runtime but it fails to load database. When I try to run 32 bit, I get the message unable to find file specified. Is there any way to run this on a 64 bit machine but run it 32 bit due to my ODBC driver limitations?

sunk818 commented 6 years ago

Can you try adding 64 bit odbc dsn entry for the access database? Not sure what office version you are running 32 bit or 64 bit?

Try crystal run time either 32 bit or 64 bit.

Not sure if you can install 32 bit .net 4.5

ljkern commented 6 years ago

Thats my problem. Microsoft did away with the 64 odbc access driver that suppoted dbf. I can only run it in 32 bit.

sunk818 commented 6 years ago

Can you save access as Excel?

ljkern commented 6 years ago

no I am interfacing to 40+ dbf files. They have indexes so converting to Excel would break the Crystal Reports because they have links. Is there any way to run the older CREXPORTER (which is 32 bit) on a 64 bit machine?

mhertzfeld commented 6 years ago

What you are asking should be possible.

Did you install the 32bit crystal runtimes? There should be no issues installing the 32bit crystal runtimes on a 64bit windows 10 OS. If you are having problems installing the 32bit crystal runtime try uninstalling the 64 bit runtime first. Also make sure you are running the latest version. 13.22 is the latest at the time of this writing. You can download the latest crystal rutimes here http://www.crystalreports.com/crystal-reports-visual-studio/

Are you using the 32bit version of the ninja app? You can get it here https://github.com/mhertzfeld/CrystalReportsNinja/tree/master/Deployment/32-bit

sunk818 commented 6 years ago

I have old version of crexport that works on .net 4.0 and is 32-bit. Back when rainforestnet.com just had the crexport utility. Do you want that version? Maybe that will help you?

Oh I see he still has the old repo: https://github.com/rainforestnet/Crystal-Reports-Exporter/tree/master/crexport/bin/Release

That binary may be useful for you. .NET 4.0 is required. If you can't find it, let me know I have a folder with all the setup files.

ljkern commented 6 years ago

Tried mhertzfeld solution. Installed Crystal Runtime 32 bit and his 32 bit version of the Ninja App. Sadly, it did not work. Got an exception: Object Reference not set to an instance of an object. Any idea what would cause this? Can't use the old crexport. Have to run with .NET 4.5.....

mhertzfeld commented 6 years ago

The error is probably related to a parameter the app is expecting but was not passed. A bug I am sure.

If you send me a copy of what your passing into the app I will try to replicate and fix the issue.